Habitat Generic SearchService.cs

WP Upload Directory not writable! Check file and directory permissions
Hi, Updated Sitecore.Foundation.Indexing.Services.SearchService.cs file within Habitat project and make it more generic so can extend and use within Feature modules. Code I have updated in SearchService.cs It is easy to implement For an example if you want to implement in feature module than first create a class inherits from SearchResultItem/ IndexedItem and add your fields ...

Convert Sitecore item into RenderingModel for MVC 2

WP Upload Directory not writable! Check file and directory permissions
Following code helps to add in item extension class or helper class to convert Sitecore item into Sitecore.Mvc.Presentation.RenderingModel. I have added code and extended in local Habitat Foundation project. public static RenderingModel AsRenderingModel(this Item item) { RenderingContext renderingContext = RenderingContext.CurrentOrNull; Assert.IsNotNull(renderingContext, "RendreingContext is null"); // get rendering var rendering = renderingContext.Rendering; Assert.IsNotNull(rendering, "Rendreing is null"); ...