Following a recent upgrade to EE 2.6.1 I am having trouble with relationship navigation content showing up correctly here. The content in question is the right sidebar where is says: Sub Navigation.

Here is the code:

<!-- Subnavs -->                                                         
                        <div class="box"> 
                            <h2>Sub Navigation</h2>
                            <ul class="nav">
                                {exp:channel:entries channel="customer_services" orderby="entry_date" dynamic="off" sort="asc"}
                                {if parent_page=="0"}                   
                                        <a href="{title_permalink=customer-services}" title="{title}">{title}</a>
                                        {reverse_related_entries weblog="customer_services"}
                                            {if count==1}<ul>{/if}
                                            <li><a href="{title_permalink=customer-services}" title="{title}">{title}</a></li>
                                            {if count==total_results}</ul>{/if}

I would appreciate any guidance for getting this to display correctly.



Relationships were completely rewritten in EE 2.6, so your reverse_related_entries will no longer work unfortunately.

See http://ellislab.com/expressionengine/user-guide/modules/channel/relationships.html#tag-reference for updated documentation.

However the updater should have replaced your existing relationship tags with their equivalents.

  • The upgrade did not change it.
    – forrest
    Jul 25 '13 at 20:30

Instead of reverse_reated_entries, use the parents tag in 2.6. (Also, you're using weblog when you should be using channel).

{parents channel="customer_services" field="relationship_field_name"}
    {if parents:count == "1"}<ul>{/if}
    <li><a href="{parents:title_permalink="customer-services/index"}" title="{parents:title}">{parents:title}</a></li>
    {if parents:count == parents:total_results}</ul>{/if}
  • Hi Derek, I see the logic in the code you provided, however, when I implement it I get four different PHP errors related to: Undefined offset: 52, Filename: relationship_parser/Parser.php;
    – forrest
    Jul 25 '13 at 19:50
  • Perhaps you don't need the parents: prefix to the title_permalink tag. Try removing that. Jul 25 '13 at 21:07
  • Hi Derek, I still get the same error.
    – forrest
    Jul 25 '13 at 21:33
  • You mention four errors - do you have four entries? Jul 25 '13 at 22:18
  • There are only three entries in the section that have relationships.
    – forrest
    Jul 26 '13 at 16:32

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.