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

Multisite Grid Field Relationships

How Do I?

southland's avatar
southland
3 posts
10 years ago
southland's avatar southland

I am trying to get a value from a relationship field within a grid field. I have tried the suggestions on this site, but none are working for me.

so basically i have this:

{exp:channel:entries channel="series" orderby="date" sort="desc" limit="1" show_future_entries="no" status="open" category="45"  } {!-- "series" contains the grid filed "lessons" --}
     {lessons orderby="date" } {!-- This is my Grid --}
      {lessons:title} {!-- Column in the Grid - Type: Text Input --}
      {lessons:date format="%M %j, %Y"} {!-- Column in the Grid - Type: Date --}
      {lessons:summary} {!-- Column in the Grid - Type: Textarea --}
      {lessons:speaker} {!-- Column in the Grid - Type: Relationship --}
     {/lessons}
    {/exp:channel:entries}

I can not get the value for speaker which is a relationship to a channel (short name “staff”), and i want the field value for “staff_first_name” that is populated from another multisite that we have up. I can assign values to it when publishing (it is a dropdown of values that have been put in from the other site). I have tried the following replacements for the {lessons:summary} line:

{lessons🔈staff_first_name} {lessons🔈staff:staff_first_name} {lessons🔈staff_first_name} {lessons🔈staff:title} {lessons:speaker} {staff:staff_first_name} {/lessons:speaker} {lessons:speaker} {speaker} {/lessons:speaker} {lessons:speaker} {staff_first_name} {/lessons:speaker}

None of the above have worked.

       
jay_turley's avatar
jay_turley
46 posts
10 years ago
jay_turley's avatar jay_turley

I have no clue, but am posting here to get updates on this thread, cause I’m curious as well. It feels to me like you’d have to use the relationships tag pair, but since you tried it, I’m not sure what the syntax would be to make it work.

       
southland's avatar
southland
3 posts
10 years ago
southland's avatar southland

I just can not find anything online like what i want to do, and i would think it’s not that out of the ordinary since relationship is a type that you can use in grid.

I am wondering if multisite is somehow the problem. Although i have used that exact “staff_first_name” field as a relationship in another site that we have under the multisite umbrella. So i know i can access the values from site to site. But in that case i did not have the relationship within a grid, so it’s not helping me solve this one.

But i appreciate you reading over it and giving me some feedback!

       
southland's avatar
southland
3 posts
10 years ago
southland's avatar southland

YAY - After taking a little break, and enough guessing and i finally figured it out!

So the answer is:

{lessons:speaker} {lessons:speaker:staff_first_name} {/lessons:speaker}
       
jay_turley's avatar
jay_turley
46 posts
10 years ago
jay_turley's avatar jay_turley

Thank you for following up with a solution for posterity.

       

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.