That's handy, Roelof, but people should be aware that you shouldn't really use back-end services (like ContentTypeService) for front-end queries as it hits the DB hard. It's fine for back-office or custom stuff, of course.
Good point Dan, I guess I should have elaborated that. We use it within a custom page save event. I thought it might be handy to mention if someone was looking for properties related to tabs, as I often find useful info too here on the forum. New to sharing information here, so I will think it through better next time ;-)
How to get all tabs and properties in a single loop
Hi,
I have one document type with a lot of tabs and properties I wan't to iterate and display all the value, I use Template.
@foreach(var page in CurrentPage) { // display some text or Image }
How can I iterate the other tabs and properties?
I'm not quite clear what you are trying to do, but you can iterate all the properties of the current page like this:
Hi Dan,
Thanks for the quick reply thumbs up
Glen
Somewhat related, I recently needed to iterate properties from specific composition tabs. This can be done like so:
Using propRegEx as a regular expression for matching certain tab names. Might be useful for some as well...
That's handy, Roelof, but people should be aware that you shouldn't really use back-end services (like ContentTypeService) for front-end queries as it hits the DB hard. It's fine for back-office or custom stuff, of course.
Good point Dan, I guess I should have elaborated that. We use it within a custom page save event. I thought it might be handy to mention if someone was looking for properties related to tabs, as I often find useful info too here on the forum. New to sharing information here, so I will think it through better next time ;-)
Hi Roelof,
Thank you for your suggestion really appreciated
Glen
is working on a reply...