Sitecore Custom Index Computed Field

In our previous Sitecore application, we sometimes need to have a custom computed index field based on the business requirements.  For example, we might need an extra field for faceting purpose of certain data template. In order to have a custom index field, you need...

Sitecore MVC Controller Rendering

This blog post will describe the steps on how to create controller rendering in Sitecore MVC.  One of the benefits of using controller rendering is to set aside the complex logic in the MVC controller. First, you need to create a definition item in the Sitecore tree....

Sitecore Render Image with Glass Mapper

In Sitecore, since it handles the media items through media url, there are query string parameters to control the media item’s properties.  Below are some of them for images: w: Width in pixels h: Height in pixels mw: Maximum width in pixels mh: Maximum height in...

Dynamic Placeholders for Sitecore MVC

We all know that placeholders are an integral part of Sitecore, allowing us to add various components on a page that we have developed. You can even nest placeholders, so that a component placed in one placeholder can offer another placeholder that can house even more...

Add Custom Classes to Sitecore WFFM

In the Form Designer property panel, there is an option “CSS Class ” for you to choose which css class to apply.  Shown as the screenshot below: You can add additional custom class names to this dropdown list by adding  Extended List Item to the following path:...

Get Media Url From Sitecore Image Field

If you have a sublayout that needs to get the URL of a media item, such as an image (item[“Image”]), here is a quick tip on how you can get that media URL.   Item item = Sitecore.Context.Item; Sitecore.Data.Fields.ImageField imgField =...