Closed lioneaglesolutions closed 2 years ago
No worries!
The nested if
statement like that within other tags is technically not supported, and I would recommend something like this for now (even though it is a bit repetitive!):
{{#
@name Header
@desc The sites header rendered on each page.
#}}
<header class="w-full py-4 z-40">
<div class="fluid-container flex justify-between items-center">
{{ partial:components/logo width="150" }}
{{ partial:navigation/main }}
{{ if current_uri === '/' }}
{{ partial:components/button label="Early Access" class="uppercase shadow-md" variant="white" }}
{{ else }}
{{ partial:components/button label="Early Access" class="uppercase shadow-md" variant="solid" }}
{{ /if }}
</div>
</header>
Having said that, the formatter definitely shouldn't be adding undefined
to the template; this has been resolved as of 1.1.4
Thanks for the tip! I'll update that now. Thanks.
Sorry to open another issue!
When I have a component like below;
Upon formatting, an odd
undefined
is thrown in in the button partial before the close{{ /if }}
Not sure if this is a bug, or me not having the right syntax here...