Posted on 30/06/2023 10:14:52
Ah.... that explains it.
I am running some sql queries in the Themes Collection pages to figure out what themes are being used and in which areas/pages/paragraphs, in order to do some audits/cleanup. Because it's very "costly" in terms of performance and database calls, I only want to do it once, save the results in a List of objects and then for each paragraph (Theme) check against that list.
This was still a POC, hence the template approach; And I guess I can move my code to an assembly, although I wanted to see if the Swift team adopted it :P
I'm looking into this because it's easy for our customers to get a messy amount of themes and loose track of what themes are being used and where and how many times. This would allow them to figure out the 0 usages or the single-used ones and adopt another one for consistency.
I have the logic, sql queries and most of it worked out by now. I just need to access this list of objects on each theme.
I also thought in doing this in SQL, by running a procedure (or a scheduled task) and populating a temp table and querying that temp table instead. Has it's pros and cons too.
Hope that makes sense. And if you have another way to do it, I'd be happy to hear it.
Best Regards,
Nuno Aguiar