1

I'm trying to use the switch variable with Matrix with no success - nothing is output. This is on the latest Matrix and EE 2.5.5:

{panels}

    <div class="panel {switch=panel-n1|panel-n2|panel-n3|panel-n4}">

        <h2>{headline}</h2>

        <div class="editor-content">
            panel_text here
        </div>

        {if structure_page OR url}
            <a href="{if structure_page}{structure_page}{if:else}{url}{/if}" class="cta" title="{headline}">{cta}</a>   
        {/if}

    </div>

{/panels}

Any suggestions where I'm going wrong?

Thanks

1

Argh, sorry. Was missing quotes:

{switch='panel-n1|panel-n2|panel-n3|panel-n4'}

Doh!

1
  • 1
    Please feel free to accept your own answer, so the issue is marked as resolved or not open. – nonprofit_tech Jan 9 '13 at 17:05

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.