News:Clicks
Version: - integerSummary
Returns the number of times a news item has been visited by a user.
Settings
The value is generated automatically.
Remarks
Requires that you have chosen the Most popular ordering option under the paragraph settings.
(Page > Paragraph > Module tab > News list > (Advanced) > List panel)
Examples
Outputting the template tag
@GetInteger("News:Clicks")
Check if tag has a value
@if(!int.IsNullOrWhiteSpace(GetInteger("News:Clicks"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
int storedTag = GetInteger("News:Clicks");
}
Outputting the template tag
<!--@News:Clicks-->
Check if integer has a value
<!--@If Defined(@News:Clicks)-->
Let's output this tag here: <strong><!--@News:Clicks--></strong>
<!--@EndIf(@News:Clicks)-->