Domanda

Layout (default.hbs):

{{> header}}

{{> body}}

{{> footer}}

Header.hbs
Containers the header with navigation

Achieve:
I do not want to show navigation in search page

Please let me know how can i achieve the conditional header, where i can display normal header in all pages and without navigation in my search page.

È stato utile?

Soluzione

You will need to pass in a variable to identify the page as being the search page, then use that in a conditional statement to render the header or not. A bit like this:

{{#unless isSearchPage}}
    {{> header}}
{{/unless}}

{{> body}}

{{> footer}}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top