Adrian Madrid wrote:
I have a zclass which defines articles with a 'location' field. (ie. location = 'Portal.Publications.Review'). My problem is that the articles are located in a certain area but need to show in the 'location' specified. I don't understand why this code works:
<dtml-with "Portal.Publications.Review"> <p>This is the <dtml-var document_id> Document in the <dtml-var title_and_id> Folder.</p> </dtml-with>
While this code does not work:
<dtml-with "_['location']"> <p>This is the <dtml-var document_id> Document in the <dtml-var title_and_id> Folder.</p> </dtml-with>
Any ideas?
Portal.Publications.Review is being passed as an expression in your first example, not a string. You cannot pass expressions in string variables in DTML. To resolve objects given a path use: <dtml-with expr="REQUEST.resolve_url('/Portal/Publication/Review')"> You could also pass a variable here as in: <dtml-with expr="REQUEST.resolve_url(location)"> hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>