News:Image

Version: - string  

Summary

Returns the <img> code for the news item image.

Settings

The value is based on the Image field for the news item.

(Modules tab > News > Category > News > Layout - Image)

Remarks

The value is returned as a HTML code snippet containing an <img> tag.

The tag is also available in notification emails.

Examples

Outputting the template tag

@GetString("News:Image")

Check if tag has a value

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

Assign tag to a value for later use

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

Outputting the template tag

<!--@News:Image-->

Check if string has a value

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