Posts

Showing posts with the label Renderings

Sitecore: Indexing Associated Content

Setting up indexes and indexing content for site search in Sitecore is a pretty straightforward task and there is an extensive knowledge base put together by the community with various examples. One useful construct we often find ourselves implementing for keyword search is  setting up a computed field . I typically use this construct to index any additional content referenced by a page, typically (content blocks, promos, callouts) added to the page via presentation details The Need: Index externally reference content by a page item Solve: Create a computed field to index TextField and HtmlText type fields of referenced items This implementation fetches all the renderings for the current item's presentation for the default device and checks their datasource item for index-able content. As a suggestion, check if the current item inherits from certain page templates else skip the execution. Step1: Create a class and implemented the IComputedIndexField interface as shown below: pu

Sitecore Tabbed Select Rendering dialog

Image
If you aren't already doing this, you should be! Found an interesting module (unable to find it on Sitecore Marketplace) to show renderings grouped into tabs while using the Select Rendering dialog from page editor. The idea is to go from this: To: The approach is promising with a few updates: Tried implementing it by inheriting from SelectRenderingForm and it did not work. No rendering items were being listed. Had to decompile Sitecore.Client.dll and copy the code from Sitecore.Shell.Applications.Dialogs.SelectRendering.SelectRenderingForm Had to comment the following line in OnLoad  this.Renderings.InnerHtml = this.RenderPreviews((IEnumerable<Item>)renderingOptions.Items); Found a few issues with the styles, could have be an updated style sheet for Sitecore 7.5, but had to add the following attributes to the tabstrip Background="white" Padding="0px" style="position:absolute; width:100%;top:0px" Here is a detailed description of my implementati