News:Date

Version: - date  

Summary

Returns the date of the news item.

Settings

The value is based on the date set for the news item.

(Modules tab > News > Category > News > Settings - Date)

Remarks

The tag is also available in notification emails.

Examples

Outputting the template tag

@GetDate("News:Date")

Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetDate("News:Date"); }

Outputting the template tag

<!--@News:Date-->

Check if date has a value

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