Posts

Creating Image Sitemap for Sitecore site

Image
I have to generate an image sitemap for multisite Sitecore application, but I can’t get any tool available online for creating unlimited pages image sitemap, So I have decided to do it programmatically. Let's do it. Step 1: Add a reference to HtmlAgilityPack.dll Step 2: Add a new Item " SitemapTest" add assign the item to use(rendering/Layout ) that we going to create in  Sitecore solution where we need to get the image sitemap. Step 3: Add the condition not to crawl this newly added view page by the code we going to do. Step 4: Add the following code for image sitemap generation in the new rendering/Layout file and add it to Sitemaptest Item.            List < Item > itemsList =  new   List < Item >();              string [] languages = {  "en" ,  "ar-ae" ,  "zh-cn" ,  "it-it" ,  "ru-ru"  };  ...

Sitecore services Client(SSC) - SeviceAPIController Rest

Image
Business has given the requirement to access the content of the items based on a template using some criteria by passing a parameter, this content will be used by the different opensource application and mobile device. So, I have decided to create an API using Sitecore service client(SSC) Step 1: Create the template for the item that needs to be searched. Step2: Create the class which inherits from ServiceAPIController (It is a WebAPI controller in asp.net but with all the security available for the items provided by Sitecore) namespace Company.Feature.RestraurantsAPI.Controllers {     [ ServicesController ]     public class RestaurantController : ServicesApiController     {         // GET: Restaurant         [ HttpGet ]         public IHttpActionResult Get( string id)     ...