Just in Chronicles

Life as a Voyage

Posts Tagged ‘Preview

Enhanced Preview for Umbraco

leave a comment »

Existing preview function in Umbraco only supports actual pages, not contents shared within a website. This approach is logically correct as shared contents are not independent pages. However, there must be demands to preview shared contents before publishing them.

This Umbraco extension enables for content editors to preview what they have written and how the contents would be looking like, before they publish the contents.

Basic idea is simple. Umbraco provides an alternative template function by using AltTemplate querystring.

This extension allows users to assign certain document types to templates. So, when users click the preview button, this extension starts looking up the configuration values to for document type  Рtemplate mappings.

        <clear />
        <add alias="Product" template="StandardPage" redirectUrl="/products/product/{0}" />
        <add alias="Company" template="StandardPage" redirectUrl="/companies/company/{0}" />

Like the example above, the extension registers a config file, EnhancedPreviewConfiguration.config under /config/ directory. Based on this example, a document type Product will use the template StandardPage for its preview mode. After the preview, the preview page will be redirected to /products/product/[productId] page.

If you guys are interested in, please visit the following websites.

Written by Justin Yoo

31/07/2012 at 17:20

Posted in For .NET

Tagged with , ,