Let's say I have three dtml methods: /Common/Top /Common/StyleSheet /Hello/index_html
From the index_html file inside the Hello folder, I want to call the Top file so I do:
<dtml-var "Common.Top()"> It is working well if the Top file does not include another document. If Top has something like <dtml-var StyleSheet>, it does not find the StyleSheet (except if i call it directly in the Common folder). Is it possible to do this? Thanks Remy
From: "Remy Pinsonnault" <remypinsonnault@gmail.com>
Let's say I have three dtml methods:
/Common/Top /Common/StyleSheet /Hello/index_html
From the index_html file inside the Hello folder, I want to call the Top file so I do:
<dtml-var "Common.Top()">
It is working well if the Top file does not include another document. If Top has something like
<dtml-var StyleSheet>, it does not find the StyleSheet (except if i call it directly in the Common folder).
How about: in index_html you could have: <dtml-with Common> <dtml-var Top> </dtml-with> This gives you access to 'Common'. HTH Jonathan
Remy Pinsonnault wrote:
Let's say I have three dtml methods:
/Common/Top /Common/StyleSheet /Hello/index_html
From the index_html file inside the Hello folder, I want to call the Top file so I do:
<dtml-var "Common.Top()">
It is working well if the Top file does not include another document. If Top has something like
<dtml-var StyleSheet>, it does not find the StyleSheet (except if i call it directly in the Common folder).
Is it possible to do this?
Perhaps using <dtml-with Common><dtml-var Top></dtml-with> will work. I'm not terribly current on my DTML magic nowadays, though. --jcc -- "Building Websites with Plone" http://plonebook.packtpub.com/
Remy Pinsonnault wrote:
Let's say I have three dtml methods:
/Common/Top /Common/StyleSheet /Hello/index_html
From the index_html file inside the Hello folder, I want to call the Top file so I do:
<dtml-var "Common.Top()">
It is working well if the Top file does not include another document. If Top has something like
<dtml-var StyleSheet>, it does not find the StyleSheet (except if i call it directly in the Common folder).
Is it possible to do this?
Switch to zpt, there you have the 'root' name bound already, so you can do: <tal:x replace="root/common/Top"/> ...and in top you can do: <tal:x replace="root/common/StyleSheet"/> cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (4)
-
Chris Withers -
J. Cameron Cooper -
Jonathan Hobbs -
Remy Pinsonnault