Output Multiple Express Objects in One List
Permalink
I am new to this, so I am not fully sure I am asking this right.
Taking Andrew’s example of Marina/Boats, let’s say I have another page, where I want to list all the boats with associated marina next to it. I created a templates folder in the express_entry_list. I was able to output all the boats and their information. What is the syntax to echo the marina association entry for each boat?
Another example would be the stylists and locations. This example is closer to what I am looking for. The relationship is many-to-many. How do I add the location next to stylist and vice versa?
Taking Andrew’s example of Marina/Boats, let’s say I have another page, where I want to list all the boats with associated marina next to it. I created a templates folder in the express_entry_list. I was able to output all the boats and their information. What is the syntax to echo the marina association entry for each boat?
Another example would be the stylists and locations. This example is closer to what I am looking for. The relationship is many-to-many. How do I add the location next to stylist and vice versa?
Since I want to customize how the boats listing appears, I created a templates file boats.php and here is my code:
<h1><?=$item->getEntry()->getBoatTitle();?></h1>
<p><?=$item->getEntry()->getBoatDescription();?></p>
<p>Marina: <?=$item->getEntry()->getMarinaName();?></p> (this code is wrong, I am looking for help to write the correct syntax)