Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible for nested custom helpers to communicate between each other? #1023

Closed
mattkime opened this issue May 8, 2015 · 1 comment
Closed

Comments

@mattkime
Copy link

mattkime commented May 8, 2015

i'm curious if its possible or if anyone has created something like this -

{{#customHelper}}
    {{attr key="id" value="unique_val"}}
    {{attr key="class" value="not_unique"}}
{{/customHelper}}

where the customHelper either has some knowledge of the tag structure within it

OR

the attr helper is able to set values such that customHelper is aware of them.

this could be a very useful tool for composing content.

@kpdecker
Copy link
Collaborator

Right now, you could create a data object that you intend to be mutated. The bigger problem, which #1018 is attempting to solve is there is no way to define these things without executing the child function so you end up with a convoluted exec flow if you have these sorts of helpers and other normal generation logic. Closing this in favor of #1018 as those will hopefully be generic enough to handle this use case cleanly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants