Is there a way to check if an inline partial is defined? #1783
Replies: 2 comments 5 replies
-
Checking if you found a solution to this? |
Beta Was this translation helpful? Give feedback.
-
Not used handlebars out of the box myself - used via foundation zurb panini I was testing the"Inline partial" and used with"Partial Blocks Fallover" to cater for this but was looking for an alternative inbuilt solution. Any how the "Partial Blocks Fallover" can be an alternative technique which could be used. The inline partial would need to cater for any wrapper markup. Something like this - https://handlebarsjs.com/examples/partials/inline-blocks.html modified |
Beta Was this translation helpful? Give feedback.
-
in the inline partials example, the inline partials of nav and content are each wrapped inside a div.
if one of those partials is not defined, the wrapping div will still be created, which in my case leads to issues since I am using a grid container, which is creating a new row for the div and hence also gaps before/after the new row, even though there is nothing in it.
is there some way to check if the inline partial actually exists?
something like:
I couldn't find anything in the options passed to helper functions...
Beta Was this translation helpful? Give feedback.
All reactions