質問

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.

役に立ちましたか?

解決

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}}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top