Implement meta momentum on Master template and each page
hi all, currently i using master template, its mean each page doesnt have head in each page,
how i insert
@Html.Partial("MetaMomentum/RenderMetaTags", Model.Value("modelName")) into section ?
when use this partial in each top of cshhtml, its still inside because i use master template,
The master template should have access to the current content node, so you should be able to use the above code in the master template without an issue.
Otherwise you can add a @RenderSection("head", false) in the head on the master page and
@section head{
@Html.Partial("MetaMomentum/RenderMetaTags", Model.Value("modelName"))
}
anywhere in the page template. The code will be placed wherever you put the @RenderSection("head", false)
Implement meta momentum on Master template and each page
hi all, currently i using master template, its mean each page doesnt have head in each page, how i insert @Html.Partial("MetaMomentum/RenderMetaTags", Model.Value("modelName")) into section ?
when use this partial in each top of cshhtml, its still inside because i use master template,
thanks
Hi,
The master template should have access to the current content node, so you should be able to use the above code in the master template without an issue.
Otherwise you can add a
@RenderSection("head", false)
in the head on the master page and@section head{ @Html.Partial("MetaMomentum/RenderMetaTags", Model.Value("modelName")) }
anywhere in the page template. The code will be placed wherever you put the@RenderSection("head", false)
thanks david, its works..,
is working on a reply...