Daniel.Weber@SEMATECH.Org asked:
I have a series of pages that changes the attributes of a dtml-document. For manage_changeProperties to work I need the object ID. Passing in <dmtl-var id> doesn't seem to work because I'm not in the same folder.
Is there any way to get the unique id of an object that I can pass along and use with a <dtml-with> tag?
Hmm, I guess maybe I don't get your intent. Suppose I have a DTML Document, 'has_prop', with a property named 'aProp', currently set to 'XXX'. Its body looks like:: <dtml-var standard_html_header> <h2><dtml-var title_or_id></h2> <p> This is the <dtml-var id> Document. Property 'aProp' has value <strong><dtml-var aProp></strong>.</p> <dtml-var standard_html_footer> I have a DTML Method (*not* a document, this is important!), named 'change_prop', which looks like this:: <dtml-var standard_html_header> <dtml-call "manage_changeProperties( aProp='YYY' )"> <dtml-call "RESPONSE.redirect( absolute_url() )"> <dtml-var standard_html_footer> If I traverse through the DTML Document and then call the DTML Method, Zope does the Right Thing (TM): URL: http://localhost:8080/has_prop/change_prop leaves me showing the body of has_prop, whose property 'aProp' is now 'YYY'. I don't have to mess with the id of the document at all. The key is that change_prop, a DTML Method, can't have properties: it uses whatever properties belong to (or are acquired by) its "caller." In this case, the caller is has_prop, so has_prop's properties get changed. Does that help any? Tres. -- ========================================================= Tres Seaver tseaver@digicool.com tseaver@palladion.com
participants (1)
-
Tres Seaver