1

I'm trying to get a multi-entry relationship field to render in a template using EE 2.6.0, however I'm getting "Unmatched Relationship Tag: "{impact_stats}"" with template debugging enabled, with it disabled I get nothing with the conditional, without the conditional it just outputs the actual tags and not their contents.

This is the code I'm using, it's contained within a exp:channel:entries loop and all of the entry's tags other than the impact_stats one is working.

{if impact_stats}
<section class="content-stats-listing">
    <div class="row">
        {impact_stats}
        <article class="module-stats note av-fire">
            <h4>{impact_stats:headline}</h4>
            <p>{impact_stats:description}</p>
        </article>
        {/impact_stats}
    </div>
</section>
{/if}

Any ideas?

1 Answer 1

1

Looks like the template parser is thinking that your conditional is the opening variable of a pair.

Try this:

{impact_stats}
    {if impact_stats:count == 1}
    <section class="content-stats-listing">
        <div class="row">
    {/if}
            <article class="module-stats note av-fire">
                <h4>{impact_stats:headline}</h4>
                <p>{impact_stats:description}</p>
            </article>
    {if impact_stats:count == impact_stats:total_results}
        </div>
    </section>
    {/if}
{/impact_stats}
1
  • It looks like my main issue was the {color} html comment, another dev added it and that tag doesn't exist so it must have been causing the parsing issue. However once I removed it still wasn't working with my original code, your code solved the issue. Thanks!
    – jtkendall
    Jun 7, 2013 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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