Automatic page template snapshots

When creating a new page in EPiServer 7, the edit interface provides the option of showing thumbnails for each page type available.

EPiServer provides a mechanism to select a url to an image which can be used as this thumbnail

[ImageUrl("/path/to/thumb.jpg")]

However if you would like these thumbnail images to be snapshots of the page template, then a manual task of capturing and storing these images would be required to populate the gallery and keep them up to date when designs change.

EPiBoost provides an alternative attribute and related HttpHandler that can be used to generate page snapshots on the fly and remove the necessary overhead of creating these manually. This will guarantee that your page thumbnails are always up to date.

To use the functionality, decorate your content type classes with

[AutoImageThumbnail(typeof(PageTypeClassNameHere))]

and ensure that the following http handler is registered in your web.config

<add name="PageTypeThumbnailHandler" verb="*" path="*.ptthumb" type="EPiBoost.Core.Handlers.PageTypeThumbnailHandler, EPiBoost.Core" />

The handler will find the most recent page matching the type in the attribute and generate a snapshot

Last edited Nov 14, 2012 at 9:59 AM by jmenziessmith, version 8

Comments

No comments yet.