Hi there,
I’ve built a listing using Ditto that pulls the hierarchy of a section of my website onto a page. The tricky thing for me is that some of the items are containers (that contains other items), and the rest are weblinks pointing to a PDF. For some of the weblinks there aren’t a PDF and then it needs to go to another page specifying where to get the PDf.
So I’ve got to have three types of links that Ditto needs to display.
1. container items
2. weblinks with valid PDF
3. weblinks with no PDF, therefore links to another page.
I’ve tried to add PHx statements to my Ditto template chunk, but that didn’t really work. I need to test the content field. If it’s empty then it’s nr.3. If it’s not empty and contains the string "/download/" then it’s nr.2. If it is a container, then it’s nr.1
Is there a way to get this working ?
Thanks
Ettiene