ItemType

Version: - string  

Summary

Returns the type of the item that the comment is added to (ecomProduct, news, page ).

Settings

The value is based on the value in the Comment.ItemType input field in the comments code:

<input type="hidden" name="Comment.ItemType" value="ecomProduct" />

Examples

Outputting the template tag

@GetString("ItemType")

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("ItemType"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetString("ItemType"); }

Outputting the template tag

<!--@ItemType-->

Check if string has a value

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