Help understanding nested twig components and optional elements #2647
Unanswered
dheineman
asked this question in
Questions & Answers
Replies: 1 comment
-
Hi, I'm not an expert about this subject, but maybe What if you replace |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
I have been experimenting with Twig components and am trying to figure out if what i am trying to do is possible, or even advised (maybe i need to look at it differently). i have searched through issues/discussion the docs and even the source but i am not seeing an option right now.
I have a modal component composed of a header, body and footer & a form component (simplified code listed below) and when i used this component in my page i want the form to optionally render if the user provides any nested form props/attributes.
Besides the optional form i cannot figure out if the nesting in am trying to do is even possible. On my page an have added the following code. The h1 text here should be placed in between the
<twig:Modal:Body></twig:Modal:Body>
tags in the component below.But because of the
<twig:Form>
is surrounding it (which itself has its own content block) it will instead render just the form tags with the text "This content here" in it. Is there any way to have nesting like this?Components
Beta Was this translation helpful? Give feedback.
All reactions