News:Link
Version: - stringSummary
Returns the shortcur URL attached to the news item.
Settings
The value is based on the Shortcut field for the news item.
(Modules tab > News > Category > News > Settings)
Remarks
The value should be assigned to the <a> href attribute.
If no shortcut is specified a URL to the content of the news item is generated automatically.
Examples
Outputting the template tag
@GetString("News:Link")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("News:Link"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("News:Link");
}
Outputting the template tag
<!--@News:Link-->
Check if string has a value
<!--@If Defined(@News:Link)-->
Let's output this tag here: <strong><!--@News:Link--></strong>
<!--@EndIf(@News:Link)-->