Is it a DTML method, Document, folder, or image?
Hey all, let's say that I want to be able to go into a folder and find out something about each object within...namely its type. I can't seem to find the correct syntax. I can do this for the title if the objects: <dtml-in objectValues> <dtml-var title><br> </dtml-in objectValues> but I can't seem to find the 'type'. I tried different syntaxes, to no avail. Anyone know how to code this? Also, is there a way to specify a wildcard? Situation: I have separated all content from display. The user can update the site's content. All editable content goes into methods that start with 'Editable_' A folder can have one or more of these methods inside, so I want to list all available methods in a folder that start with that name. How do I achieve this? Maybe something similar to: <dtml-in objectValues> <dtml-if expr="id == 'Editable_'*"> <dtml-var id> </dtml-if> </dtml-in objectValues> Obviously, this doesn't work, but I'm looking for something similiar. Check that, I'm looking for something that works; if it doesn't resemble the example, well, I don't care! ;> Thanks in advance, Tommy Innovation: The Best Way To Predict The Future ... Is To Create It.
By type you probably mean meta_type: <dtml-in objectValues> <dtml-var meta_type><br> </dtml-in objectValues> You dont need to do a wildcard, just check if the first 9 characters match: <dtml-in objectValues> <dtml-if "getId()[:9] == 'Editable_'">Found one<br></dtml-if> </dtml-in objectValues> Cheers. -- Andy McKay.
participants (2)
-
Andy McKay -
Tommy Johnson