News:Search

Version: - string  

Summary

Returns a search form to search in news items.

Settings

The search form comes from the Search template. You need to add this tag to the news list template in order to change the apperance of the search form. The Search form is chosen under the paragraph settings.

(Page > Paragraph > Module tab > Frontend editing > Search)

Examples

Outputting the template tag

@GetString("News:Search")

Check if tag has a value

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

Assign tag to a value for later use

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

Outputting the template tag

<!--@News:Search-->

Check if string has a value

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