News:CategoryID
Version: - integerSummary
Returns the current news item category ID
.
Settings
The value is based on the category of the current news item.
Examples
Outputting the template tag
@GetInteger("News:CategoryID")
Check if tag has a value
@if(!int.IsNullOrWhiteSpace(GetInteger("News:CategoryID"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
int storedTag = GetInteger("News:CategoryID");
}
Outputting the template tag
<!--@News:CategoryID-->
Check if integer has a value
<!--@If Defined(@News:CategoryID)-->
Let's output this tag here: <strong><!--@News:CategoryID--></strong>
<!--@EndIf(@News:CategoryID)-->