-
-
Save Chalkin/636157366d53e324df8172ef5a1f8ac9 to your computer and use it in GitHub Desktop.
| {{ sections }} | |
| ... | |
| {{ if type == 'extended_content' }} | |
| <div class="section-empty"> | |
| <div class="container content"> | |
| {{ if type == "text" }} | |
| <div class="text"> | |
| {{ text }} | |
| </div> | |
| {{ elseif type == "image" }} | |
| <figure> | |
| <img src="{{ image }}" alt="{{ caption }}" /> | |
| <figcaption>{{ caption }}</figcaption> | |
| </figure> | |
| {{ /if }} | |
| </div> | |
| </div> | |
| ... | |
| {{ /if }} | |
| {{ /sections }} |
I tried. Seems like the body keyword knocks out all of the other HTML/Content of every element inside the flexible template. So I changed it to "content" - Now it renders the HTML (also from the other flexible types) but it does not go into the if inside the content loop of the "extended_content"
So if type == "text" will not go into the if.
But when I do {{ type }} it does show all the strings inside the content (e.g text, quote, image, text)
{{ if type == 'extended_content' }}
<div class="section-empty">
<div class="container content">
{{ content }}
{{ if type == "text" }}
<div class="text">
{{ text }}
</div>
{{ /if }}
{{ if type == 'quote' }}
<div class="quote">
{{ text }}
{{ cite }}
</div>
{{ /if }}
{{ if type == "image" }}
<figure>
<img src="{{ image }}" alt="{{ caption }}" />
<figcaption>{{ caption }}</figcaption>
</figure>
{{ /if }}
{{ /content }}
</div>
</div>
{{ /if }}
I also updated the content gist.
What exactly do you mean by the body keyword knocks out all of the other HTML/Content of every element inside the flexible template?
Well, that when I use the {{ body }} {{ /body }} inside the extended_content HTML, none of the other Fieldsets/types render anymore. Basicly the area where the template's html should render, stays empty.
See attached Screenshot. In this example it should actually also render the html of the simple_content type as well
Do you have any other vars named body or content that might be conflicting?

It looks like you're just missing the
{{ body }}loop so you can get the content and sets inside the Bard field. Try this: