Hi guys, were having a little problem with some code we are writing for our website. We have a method that uses the bobobase to locate the newest image file in a directory and create a thumbnail of that image. We then want to load this method into our main page to show the thumbnail. The code for the method is as follows: <dtml-let images="objectItems('Image')"> <dtml-in images sort="bobobase.modification_time()" size=1> <dtml-let item=sequence-item> <img src="<dtml-var "item.id()">" width='150' heigth='113'></img> </dtml-let> </dtml-in> </dtml-let> This works fine when you view it, and it also with the below code IN the folder, but we can't get it to work outside the folder: <html> <dtml-var thumbnail> </html> and if we try this: <html> <dtml-var "folder.thumbnail"> </html> with folder as the path to the folder, it just renders the DTML code. Can anyone provide a suggestion on how to solve this? Thanks Tane Piper Lead Designer http://www.legiongame.nl
--- Tane Piper <tane@zzict.nl> wrote: ...
The code for the method is as follows:
<dtml-let images="objectItems('Image')"> <dtml-in images sort="bobobase.modification_time()" size=1> <dtml-let item=sequence-item> <img src="<dtml-var "item.id()">" width='150' heigth='113'></img> </dtml-let> </dtml-in> </dtml-let>
This works fine when you view it, and it also with the below code IN the folder, but we can't get it to work outside the folder:
<html> <dtml-var thumbnail> </html>
I may be speaking out of turn here, but wouldn't the namesapce need to be pushed on the stack if its not available thru acquisition? would this work? <dtml-with folder> <dtml-var thumbnail> </dtml-with>
and if we try this:
<html> <dtml-var "folder.thumbnail"> </html>
with folder as the path to the folder, it just renders the DTML code.
I would think this is not render()'ed, would it work with something like <dtml-var "_.render(folder.thumbnail)"> or <dtml-var "folder.thumbnail()"> <===> <dtml-with folder> <dtml-var "thumbnail()"> </dtml-with> ??? I maybe wrong :( just trying to help! regards, Amr
Can anyone provide a suggestion on how to solve this?
Thanks
Tane Piper Lead Designer http://www.legiongame.nl
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
participants (2)
-
Amr Malik -
Tane Piper