I have layout page and the page that uses layout.
How can I add some new elements to the head not changing layout.(layout already contains head)?
Layout:
<head>...</head>
I want my page be like:
<head>all layout head logic... plus
my page new elements...
</head>
You could use sections in the layout. For example:
and then in the view override this section and provide contents for it:
And since the section is optional (second argument = false) if a view doesn’t provide any contents for it, it will stay empty.