We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

No Index Variable Inside Relationship Variable Pair

How Do I?

simononline's avatar
simononline
1 posts
10 years ago
simononline's avatar simononline

Hello fellow EE folk,

It seems to me that when using a relationship field variable pair for multiple related entries that there is no “index” variable available like there is inside a grid field variable pair - https://ellislab.com/expressionengine/user-guide/add-ons/channel/grid.html#index

I was only able to use a “count” variable eg.

{exp:channel:entries channel="info" limit="10"}
    <h2>{title}</h2>

    {relationship_field}
                Relationship row count is {relationship_field:count}
                Relationship index is {relationship_field:index} - doesn’t work
    {/relationship_field}
{/exp:channel:entries}

There also doesn’t seem to be a simple way to performing a mathematical operation on the count variable without using a third party plugin. Which is not a big issue but it seems like a logical variable to also support inside the relationship field variable pair since it is supported inside a grid field variable pair.

What do you think?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.