Try our conversational search powered by Generative AI!

Loading...
Area: Optimizely CMS
ARCHIVED This content is retired and no longer maintained. See the latest version here.

Recommended reading 

Introduction

Routing to BLOB properties is an implementation of partial routing which makes it possible to extend routing beyond pages. The URL pattern to route to a BLOB property is <content url>/BlobPropertyName.

Consider a content model as follows:

C#
/// <summary>
/// Base class for content types which should be handled as images by the system.
/// </summary>
public class ImageData : MediaData
{
    /// <summary>
    /// Gets or sets the generated thumbnail for this media.
    /// </summary>
    [ImageDescriptor(Width = 48, Height = 48)]
    public override Blob Thumbnail
    {
        get { return base.Thumbnail; }
        set { base.Thumbnail = value; }
    }
}

Say then that there is an image created in CMS with an URL like http://site/GlobalMedia/Images/someimage.png. It is then possible to route to the thumbnail BLOB property on the image by the URL http://site/GlobalMedia/Images/someimage.png/thumbnail. Since the property has the attribute ImageDescriptor the Thumbnail BLOB will be automatically generated if it is null.

See also

  • Refer to the Partial Routing section in the EPiServer CMS SDK for an explanation of partial routing.
Do you find this information helpful? Please log in to provide feedback.

Last updated: Mar 31, 2014

Recommended reading