Skip to content

[HELP] Is there a way to check if an inline partial is defined? #1731

Description

@peter-affenzeller

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:

{{#if (hasInlinePartial "nav"}}
<div class="nav">{{> nav}}</div>
{{/if}}

I couldn't find anything in the options passed to helper functions...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions