Page 1 of 1
UDT: finding page with a given value in "extra"-property?
Posted: Wed Jul 23, 2025 10:59 am
by emgaron
I'm currently trying to find out if/how it is possible - within an UDT - to search for pages in the hierarchy that have one of the extra-properties (extra1-3) set to a certain value. Unfortunately, I'm struggling with the documentation at
https://apidoc.cmsmadesimple.org and have not been able to find this yet... There is "find_by_tag()" from the HierarchyManager, but that does not seem to work for something like "extra3" as tag (where
do I find the list of valid tags for that method?

). Hence, I assume I will somehow have to loop through all pages and check the "extra3"-property explicitly, but really no idea where/how to start. Pointers to documentation are most welcome!
Re: UDT: finding page with a given value in "extra"-property?
Posted: Wed Jul 23, 2025 12:27 pm
by emgaron
I should have asked this question earlier, 'cause shortly after hitting "Submit", I had a brainwave...

Maybe I'm thinking too complicated here - it may well be that Navigator with a suitable template is fully capable of solving the problem I'm trying to solve, so I'll try that first...
Re: UDT: finding page with a given value in "extra"-property?
Posted: Thu Jul 24, 2025 8:22 am
by emgaron
Ok, I can definitely solve my original problem (creating a language selector on a multilingual site based on "UIDs" in the extra3-property of the pages) by simply using Navigator - good thing I finally realised that a language selector in the end is also a sort of navigation...
I'm planning to do a write-up in a separate post in the next couple of days, where I want to outline several solutions for this problem that I have tried over the past period.
As the original problem is solved, I'll mark this thread as solved. However, if somebody feels inclined to outline how searching properties throughout the page tree can be done within a UDT and without Navigator, I'd still be curious - and grateful!