Ecom:CatalogPublishing.Preview

Version: - boolean  

Summary

Returns True when the catalog publishing list is enabled.

Settings

The value is generated automatically.

Remarks

The parameter PreviewCatalog is available as querystring and can be generated from the product list by this code:

<a href="/default.aspx?CatalogPublishingcmd=preview" >Catalog Publishing</a>

If PreviewCatalog=False the ordinary product list is rendered.

Examples

Outputting the template tag

@GetBoolean("Ecom:CatalogPublishing.Preview")

Check if tag has a value

@if(!bool.IsNullOrWhiteSpace(GetBoolean("Ecom:CatalogPublishing.Preview"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ bool storedTag = GetBoolean("Ecom:CatalogPublishing.Preview"); }

Outputting the template tag

<!--@Ecom:CatalogPublishing.Preview-->

Check if boolean has a value

<!--@If Defined(@Ecom:CatalogPublishing.Preview)--> Let's output this tag here: <strong><!--@Ecom:CatalogPublishing.Preview--></strong> <!--@EndIf(@Ecom:CatalogPublishing.Preview)-->