How can I place an images in an "/images" folder so that they can be acquired by my entire site. I've placed my images in a directory called "/images" but I can't use the <dtml-var image.gif> tag to access the image unless I'm in the /images directory or beneth it. Is there a way I can set the source directory of all image objects so that whenever I call upon an image by the image name Zope can find it? Thanks, Joe
You'd use <dtml-var images/image.gif> Also, check out the product CascadingFolders for organizing image folders.
From: "Joe Copeland" <joe@LADWP.net> Date: Sun, 6 May 2001 18:23:45 -0700 To: <zope@zope.org> Subject: [Zope] images
How can I place an images in an "/images" folder so that they can be acquired by my entire site.
I've placed my images in a directory called "/images" but I can't use the <dtml-var image.gif> tag to access the image unless I'm in the /images directory or beneth it.
Is there a way I can set the source directory of all image objects so that whenever I call upon an image by the image name Zope can find it?
Thanks,
Joe
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi Marc!
marc lindahl wrote:
You'd use <dtml-var images/image.gif>
Cool! When did that start to work? Is there a traversal patch to dtml-var? My dtml-var (2.3.1) won't do it.
Also, check out the product CascadingFolders for organizing image folders.
That's interesting, too. Or did you mean TransparentFolders? http://www.zope.org/Members/hathawsh/TransparentFolders I can't find CascadingFolders. tia, Danny
From: "Joe Copeland" <joe@LADWP.net> Date: Sun, 6 May 2001 18:23:45 -0700 To: <zope@zope.org> Subject: [Zope] images
How can I place an images in an "/images" folder so that they can be acquired by my entire site.
I've placed my images in a directory called "/images" but I can't use the <dtml-var image.gif> tag to access the image unless I'm in the /images directory or beneth it.
Is there a way I can set the source directory of all image objects so that whenever I call upon an image by the image name Zope can find it?
Thanks,
Joe
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
That's interesting, too. Or did you mean TransparentFolders? http://www.zope.org/Members/hathawsh/TransparentFolders I can't find CascadingFolders.
There's the TransparentFolders as well.... CascadingFolders are here: http://www.spoke.net/randy I'm not sure the diff....
"Joe Copeland" <joe@LADWP.net> wrote:
How can I place an images in an "/images" folder so that they can be acquired by my entire site.
I've placed my images in a directory called "/images" but I can't use the <dtml-var image.gif> tag to access the image unless I'm in the /images directory or beneth it.
Is there a way I can set the source directory of all image objects so that whenever I call upon an image by the image name Zope can find it?
...yeah funky ain't it? This is probably #1 ZopeNewbie FAQ. Here's what you have to do: <dtml-with images> <dtml-var nameofimage> </dtml-with> <dtml-with images> means something like "with the namespace of images" do whatever in there until I exit using</dtml-with> You can nest them and do all sorts of neat powerful tricks with <dtml-with> For a _real_ explanation read up on <dtml-with> in the book and elsewhere on Zope.org A pretty good one is : http://www.zope.org/Members/michel/HowTos/NameSpaceHow-To Suppose you have a subfolder called "theatre" inside /images. Then you can do this: <dtml-with "images.theatre"> # note: the quotes are important <dtml-var nameofimage> </dtml-with> This syntax still seems counterintuitive and verbose to me, even when I know why and grown familiar with it. Some might even consider it a ZopeDTML annoyance. Best to make friends though, and/or master the syntax for programming Zope using External Python Methods and/or Scripts (Python). Every tool in zope has its virtues ancd vices. The hard part is learning what those are, for you and your project. Look through How-Tos for "Image" and you'll find some useful DTML examples to copy and also design advice about images in Zope. If you have multiple folders of the same id name [such as "images"] scattered aournd your Zopesite, and you are getting headaches because <dtml-with> does not work the way you expect, then it is time to read up [again] on namespace and the 'only' tag atribute of <dtml-with> . hth ./Jason ___________________________________________________________ Jason CUNLIFFE = NOMADICS['Interactive Art and Technology']
Joe Copeland wrote:
How can I place an images in an "/images" folder so that they can be acquired by my entire site.
I've placed my images in a directory called "/images" but I can't use the <dtml-var image.gif> tag to access the image unless I'm in the /images directory or beneth it.
Is there a way I can set the source directory of all image objects so that whenever I call upon an image by the image name Zope can find it?
Thanks,
Joe
Use a transparent folder: http://www.zope.org/Members/hathawsh/TransparentFolders -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
Whooa! The transparent folders product is wonderful! It really helps to be able to perform acquisitions in the revers direction, down the file tree. I can now clean up all the clutter that is in my root folder. Thanks, -- Joe ----- Original Message ----- From: "Casey Duncan" <cduncan@kaivo.com> To: "Joe Copeland" <joe@ladwp.net> Cc: <zope@zope.org> Sent: Monday, May 07, 2001 8:01 AM Subject: Re: [Zope] images
Joe Copeland wrote:
How can I place an images in an "/images" folder so that they can be acquired by my entire site.
I've placed my images in a directory called "/images" but I can't use
the
<dtml-var image.gif> tag to access the image unless I'm in the /images directory or beneth it.
Is there a way I can set the source directory of all image objects so that whenever I call upon an image by the image name Zope can find it?
Thanks,
Joe
Use a transparent folder:
http://www.zope.org/Members/hathawsh/TransparentFolders
-- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (5)
-
Casey Duncan -
Danny William Adair -
Jason Cunliffe -
Joe Copeland -
marc lindahl