ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

[Solved] Template "Unmatched Relationship Tag"

June 07, 2013 3:08pm

Subscribe [1]
  • #1 / Jun 07, 2013 3:08pm

    jtkendall

    59 posts

    I’m trying to get a multi-entry relationship field to render in a template, 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"><!-- {color} -->
                    <h4>{impact_stats:headline}</h4>
    <p>                {impact_stats:description}<br />
                </article><br />
                {/impact_stats}<br />
            </div><br />
        </section><br />
        {/if}

    Any ideas?

  • #2 / Jun 07, 2013 4:21pm

    jtkendall

    59 posts

    Ok thanks to a helpful user over at the EE StackExchange site I was able to get this working.

    First thing I had to do was remove the

    <!-- {color} -->

    comment from my code, another dev had added it and that tag does not exist. The next thing I had to do was change my code to:

    {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}<br />
                </article><br />
        {if impact_stats:count == impact_stats:total_results}<br />
            </div><br />
        </section><br />
        {/if}<br />
    {/impact_stats}

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases