The layout tag allows to specify the layout to be used for a particular page. The layout tag must be the top most tag in any page. There can only be maximum ONE layout tag in any page.
Parameter
The tag requires a layout name as its parameter.
Example
{% layout "_Layout" %}
When the view engine finds the above tag, it looks for the file named _Layout.html
in the following locations in that order.
- Content/
<your theme>
/Views/Layout/_Layout.html - Views/Layout/_Layout.html
The layout tag must contain a {% bodyContent %}
tag that'll be replaced by the view engine at runtime.