News:[CustomFieldSystemName]

Version: - string  

Summary

Returns the value of the news custom field.

Settings

The value is based on the chosen custom field or custom field group field.

(Modules > News > General/Specific section> Custom field)

Remarks

[CustomFieldSystemName] should be replaced by the custom field system name entered in the System name field under the custom field settings in Management Center - Control panel - Modules - News - Custom fields.

Examples

Outputting the template tag

@GetString("News:[CustomFieldSystemName]")

Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetString("News:[CustomFieldSystemName]"); }

Outputting the template tag

<!--@News:[CustomFieldSystemName]-->

Check if string has a value

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