My users wants to edit pages with dreamweaver, so we have to have a index_html in the root containing: <dtml-var index.html> now, this works ok, but: when i use bobobase-modification-time to present the date when the document last change, it does not show the time of the correct object (ie: the object I want it to get the date from) structure as follow: root |----------------Folder1 | | | |-------index.html | |-------Folder2 | | |------index_html |----------index.html I have tried these two functions: <dtml-var expr="bobobase_modification_time().strftime('%d/%m/%Y, %H:%M')"><br> <dtml-var expr="REQUEST['PUBLISHED'].bobobase_modification_time().strftime('%d/%m/%Y, %H:%M')"> When i go to /root/Folder1/Folder2 I get: 1-----> 12/07/2004, 12:24 (date of Folder2) 2-----> 12/07/2004, 11:45 (date of index_html in root-folder) line nr two is "wrong" but when I try to access /root/Folder1/Folder2/index.html I get what I want: 1-----> 12/07/2004, 12:24 (date of Folder2) 2-----> 12/07/2004, 12:45 (date of index.html in Folder2) How to solve this? all documents are dtml-methods Best regards
You should explicit the object that you want to get the value, ie: <dtml-var expr="_['index.html'].bobobase_modification_time().strftime('%d/%m/%Y,
%H:%M')">
The default method that Zope calls is index_html, so when you access the url folder you get the value of index_html. And in the example above you have to access the object in that format _[''] becouse the id contain a dot []'s Marcos Iuato [ISO-8859-1] Einar N�ss Jensen writes:
My users wants to edit pages with dreamweaver, so we have to have a index_html in the root containing: <dtml-var index.html> now, this works ok, but:
when i use bobobase-modification-time to present the date when the document last change, it does not show the time of the correct object (ie: the object I want it to get the date from)
structure as follow:
root |----------------Folder1 | | | |-------index.html | |-------Folder2 | | |------index_html |----------index.html
I have tried these two functions: <dtml-var expr="bobobase_modification_time().strftime('%d/%m/%Y, %H:%M')"><br> <dtml-var expr="REQUEST['PUBLISHED'].bobobase_modification_time().strftime('%d/%m/%Y , %H:%M')">
When i go to
/root/Folder1/Folder2
I get: 1-----> 12/07/2004, 12:24 (date of Folder2) 2-----> 12/07/2004, 11:45 (date of index_html in root-folder)
line nr two is "wrong"
but when I try to access /root/Folder1/Folder2/index.html
I get what I want: 1-----> 12/07/2004, 12:24 (date of Folder2) 2-----> 12/07/2004, 12:45 (date of index.html in Folder2)
How to solve this?
all documents are dtml-methods
Best regards
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Einar Næss Jensen -
Marcos Iuato