Relationship pick problem (Parent/Child value)
Hi,
I'm trying to get this great plugin working... I'm in front of a problem.
I have 3 pods, and this is my example... I hope you'll understand it:
- metro_line: name.
I have 5 metro line so value are "L1", "L2", "L3", "L4", and "L5".
- metro_station: name, line (pick metro_line with multi-select pick).
For example my metro station name is "Catalunya" and my picked values are "L1" and "L3".
- restaurant: name, slug, ..., metro (pick metro_station).
So I put my restaurant info... and I pick my metro station "Catalunya".
In my template code I can have the "Catalunya" value... but how to get easily the "L1" and "L3" value? Is there a pods function for this? Or do I have to make my own SQL query?
PS: It's about metro in Barcelona for those who know it... who knows :)
Thank you!
edited Jun 26 '10 at 8:13
2 Answers
You should be able to pull a field through two levels of PICK columns using dot traversal like so:
<?php echo $Record->get_field('metro_station.line.name'); ?>
or inside a template using the magic tag "{@metro_station.line.name}"
Thank you so much! Had to put metro.line.name instead of metro_station.line.name for those who are looking the same thing :)


