Sitecore rendering datasource location

WP Upload Directory not writable! Check file and directory permissions
Sitecore datasource rendering datasource location query Datasource to get items from site specific location query:./ancestor-or-self::*[@@templatename=’News List’]//*[@@templateName=’News Article’] query:./ancestor-or-self::*[@@templatename=’SiteRoot’]/Global/StoreCategories/*[@@templateid='{16404FBF-2E09-4602-BAE7-27A08F2E0069}’]

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 ...

Sitecore Web Forms For Marketers (WFFM) retrieve data using code

WP Upload Directory not writable! Check file and directory permissions
Retrieve Web Forms For Marketers (WFFM) data using C# Web Forms For Marketers (WFFM) data will be extracted using following code for Sitecore Ver. 8.2

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"); ...

Sitecore SMTP testing

WP Upload Directory not writable! Check file and directory permissions
Many time developer need to do quick test about SMTP is working or not. I think most of the time developer add some code in project and deploy for testing. So for testing instead of compile and deploy; we can test quickly in less efforts. Create .aspx file using any simple editor and put file ...

Sitecore automate code generation using TDS T4 text template

WP Upload Directory not writable! Check file and directory permissions
Sitecore developers who are unaware of TDS code generation could be saving significant time and effort as well as reducing runtime errors (to compile time errors) and other type-safe coding benefits. Many developers are manually writing Field Name, Template Ids, Field Ids etc. As an example, template contains fields like Title, Text etc. Most of the time developers are ...

Customise Sitecore Rich Text Editor using Rules

WP Upload Directory not writable! Check file and directory permissions
Most sites require customised styles within Sitecore Rich Text Editor (RTE) so that the user can apply styles as needed. In Sitecore, that process is quite easy to implement. The developer is required to update settings either in web.config or by applying CSS classes into Sitecore default file, which is used by RTE. Now the ...

Configure insert options using Sitecore rules

WP Upload Directory not writable! Check file and directory permissions
In most Sitecore projects, the developer is required to set insert options to Sitecore item/content/page which will be used by Sitecore content users. In most cases developers have set insert options within the Sitecore template standard item (__Standard values). Nothing is wrong with doing that, but sometimes adding extra page can be a time consuming process, ...

Get SiteInfo or site name from Sitecore item 1

WP Upload Directory not writable! Check file and directory permissions
Following code does help to find SiteInfo and site name of current or provided Sitecore item

Sitecore get date from Date field

WP Upload Directory not writable! Check file and directory permissions
Quick and safe way to retrieve date/ datetime from Sitecore field