문제

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