DwSearchResultTitle

Version: - string  

Summary

Returns the title of the current result item (with the search phrase being highlighted).

Settings

If the result item is an ordinary page the value is based on the Page name input field in the Menu itemsection for the page.

(Page > Edit page > General tab > Menu item panel > Page name)

 

If the result item is a file the value is based on the filename.

Examples

Outputting the template tag

@GetString("DwSearchResultTitle")

Check if tag has a value

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

Assign tag to a value for later use

@{ string storedTag = GetString("DwSearchResultTitle"); }

Outputting the template tag

<!--@DwSearchResultTitle-->

Check if string has a value

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