I have the following scenario:
parent channel “Car Brand” where I store car brand. When I add an entry here I can select the car models relevant to that car brand I want as relationship. (ex. Ford brand entry has Ford GT and Ford Mustang as related entries from child channel “Car Models” )
a third channel “Car Reviews” with a channel form so a normal user can add a review in the front end
my questions. in the channel form I have a select to get all my Car Brand entry but I cannot get their child related entries from “Car Models” channel…
For example: On the front-end a user writes a review using my channel form for channel “Car Reviews” and selects Ford brand to post a review…. but I do not know how can I get the entries related to Ford (Mustang, GT, etc) in this channel form.
Any pointers would be highly appreciated.
Thank you.
Can you not use categories for the car brand instead of a channel + relationships? That would make it super simple.
If that doesn’t work for you, you might be able to do it with an embed, something like:
{embed="my_embed_template" parent_entry_id="1234"} // where 1234 is the entry_id for the brand
Then in the embedded template:
{exp:channel:entries channel="carbrand" entry_id="{embed:parent_entry_id}"}
{relationship_field}
// great stuff about cars here
{/relationship_field}
{/exp:channel:entries}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.