like below:
{{!< default test="dddd"}}
how to pass? I tried above, but seems no work
like below:
{{!< default test="dddd"}}
how to pass? I tried above, but seems no work
You canât pass parameters to the default template because itâs not actually handlebars. The library that Ghost uses (express-hbs) checks if you declared a layout separately.
If explain your usecase, someone might be able to give you a different solution
different page has different js, css file, if just put these into default template directly , you need write a lot of if else, i think it was dirty, if I can pass from page, it will be better
The contentFor
/ block
helper is your best bet
is ghost use âexpress-hbsâ default ? so I can use
{{#contentFor âpageScriptsâ}}
CONTENT HERE
{{/contentFor}}
without install it any more ?
Iâm not sure I understand your question.
The contentFor
helper is added by express-hbs so you donât need to do anything special to your installation to make it work.
You can see an example of how this helper is used in Casper:
contentFor:
block:
thank you very much, help a lot!