News:CategoryName

Version: - string  

Summary

Returns the category name of the news category.

Settings

The value is based on the Name input field for the category.

(Modules > News > Category > Settings - Name)

Remarks

The tag is also available in notification emails.

Examples

Outputting the template tag

@GetString("News:CategoryName")

Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetString("News:CategoryName"); }

Outputting the template tag

<!--@News:CategoryName-->

Check if string has a value

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