Hi guys!
I'm trying to figure out how to do this "the right" way, but I struggle a bit.. !
I have a cloned page template called experiences.php which list x number of entries, on each entry there is some basic info about the experience but in some cases - not all, I want to show a link/exerpt from a related event.php page
They way I did it so far, which doesn't really work is to create a edible field in experiences.php where I fill in the ID of the related event as so:
and then I run the pages loop as such:
That doesn't work, and I assume that's due to the linked_event varible is not located in events.php, but in the page it self? If i manully put the ID of the page in the page loop it works fine..
Special thanks to KK for this amazing piece of art..! Much appreciated! Happy Friday peeps
I'm trying to figure out how to do this "the right" way, but I struggle a bit.. !
I have a cloned page template called experiences.php which list x number of entries, on each entry there is some basic info about the experience but in some cases - not all, I want to show a link/exerpt from a related event.php page
They way I did it so far, which doesn't really work is to create a edible field in experiences.php where I fill in the ID of the related event as so:
- Code: Select all
<cms:editable name='linked_event' label='Event Linked' type='text' width='30' />
and then I run the pages loop as such:
- Code: Select all
<cms:if linked_event>
<cms:pages masterpage='events.php' orderby='page_name' order='asc' id='<cms:show linked_event />' >
<cms:show main_text /><br><cms:show event_location />
</cms:pages>
</cms:if>
That doesn't work, and I assume that's due to the linked_event varible is not located in events.php, but in the page it self? If i manully put the ID of the page in the page loop it works fine..
Special thanks to KK for this amazing piece of art..! Much appreciated! Happy Friday peeps
