Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
Hey beautiful community,

I have two clonable templates on my website:

— PROJECTS (fields: name, year, description, picture)
— AGENDA

How can I, inside AGENDA, display a dropdown with all the items inside PROJECTS?
Basically I want to associate the items from PROJECTS to my AGENDA page without having to re-write all content...

Thank you ;-)
Hi,

Assuming your projects template is 'projects.php', if you were to place the following code within the agenda template (or any template actually), it should show you the latest 10 projects -
Code: Select all
<cms:pages masterpage='projects.php' limit='10'>
    <cms:show k_page_title /><br>
</cms:pages>

The key there is the 'masterpage' param that explicitly specifies which template to fetch pages from.
You may adapt the code to create a dropdown list.

Hope this helps.
Hi KK,

My bad, I didn't explained myself correctly,

I understand how masterpages work. What I want to achieve here is to relate this two clonable items *inside* couchcms backend and not on the front end :-)

So when my client is logged into couch and adds a new project inside the tab 'PROJECTS', he can then add a new agenda item and relate it to this projects.
I think you are looking for this -
https://docs.couchcms.com/concepts/relationships.html

Would that help?
Yes!!
I'll give this a proper read and try my luck. Thank you so much KK
5 posts Page 1 of 1