1

This code is not working

{wygwam}
{if element_name=="Kasten"}
<div class="panel">{value}</div>
{if:else}
{value}
{/if}
{/wygwam}

When I use this code, all my wygwam fields will be shown, but not with the panel-formatting. Just as if the code would be

{wygwam}{value}{/wygwam}

Just loop through all wygwam fields and display them.

I have 2 wygwam fields. One is called "Fliesstext" and the other ist "Kasten". The "Kasten" (german for box) should get a grey background + a frame to look like a box.

Is this a Content Elements or a Wygwam issue?

1 Answer 1

2

Mailed KREA-Support, here´s the solution:

{if "{element_name}" == "Kasten"}

will do the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.