0

I'm stumped on this one.

I'm trying to out put related entries but nothing is being output if I use the relationship tag as a pair

{exp:channel:entries channel="clients" 
        url_title="{last_segment}" 
        status="not closed" 
        disable="categories|pagination|trackbacks"}
    {title}<br />
    {cli_honorific} {cli_first_name} {cli_last_name}<br />
    {cli_company}<br />
    <hr />

    <ul>
        <li>
            [{cli_enquiries:count}/{cli_enquiries:total_results}]<br />
            {cli_enquiries:title}
            <hr />
            <br />

            <!-- Nothing ============================================== -->
            {cli_enquiries}
                {cli_enquiries:title}
            {/cli_enquiries}
            <!-- /Nothing ============================================= -->
        </li>


    </ul>
    <hr />
{/exp:channel:entries}

This is what I am using at the moment. the data is output where the related data is not within the tag pair, but nothing outputs inside the tag pair.

Any ideas?

I'm using EE 2.8.1

1 Answer 1

0

Just to update, I found the solution to this.

The related channel in this instance has number of statuses other than 'Open' and 'Closed'.

Turns out the tag pair will only return 'Open' entries in it's loop and all of my entries are created via Channel form with a custom Status of 'New'.

You can actually use some of EE's channel entry tag parameters inside the related tag pair, so the fix was to add the status parameter to the tag pair.

{cli_enquiries status="My|Custom|Statuses|Here"}
   {cli_enquiries:title}
{/cli_enquiries}

et viola; It works.

[EDIT] Just got caught out by this again. If you use custom statuses you MUST declare what those are. for example: Using:

status="not Closed"

Will NOT work. It must be:

status="My|Actual|Custom|Status|Names"

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.