[Zope] Sharing images between different sites
Cliff Ford
Cliff.Ford at ed.ac.uk
Wed Nov 17 22:19:32 EST 2004
Your page template should have a plain text img tag:
<img src="/images/logo" width=xxx height=yyy alt="caption">
The page itself should render even if /images/logo does not exist, and
there would be no traceback.
Cliff
John Poltorak wrote:
> On Wed, Nov 17, 2004 at 03:04:25PM -0600, J Cameron Cooper wrote:
>
>>John Poltorak wrote:
>>
>>>Is there any way to set up an images folder which can be shared between
>>>several sites under one zope instance?
>>>
>>>If so how would I reference them if they were all in the /images folder?
>>
>>Very basic acquisition design. Put the 'images' folder in the site root.
>> It will be available everywhere by acquisition. Refer to it as
>>relative to wherever you are.
>
>
> Does it also work in Plone sites?
>
> I tried to include an image from '/images' in the 'left_slot'. Ended up
> with this:-
>
> * Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
> __traceback_info__: path(pathexpr)
> * Module Python expression "path(pathexpr)", line 1, in <expression>
> * Module Products.PageTemplates.PythonExpr, line 81, in __call__
> * Module Products.PageTemplates.Expressions, line 201, in __call__
> * Module Products.PageTemplates.Expressions, line 189, in _eval
> * Module Products.PageTemplates.Expressions, line 145, in _eval
> __traceback_info__:
> * Module Products.PageTemplates.Expressions, line 347, in
> restrictedTraverse
> __traceback_info__: {'path': ['images', 'logo'],
> 'TraversalRequestNameStack': ['logo']}
>
> KeyError: 'images' (Also, an error occurred while attempting to render the
> standard error message.)
>
>
> In my left_slots definition I have:-
>
> /images/logo
>
> What am I doing wrong?
>
>
>
>> --jcc
>>
>
>
>
More information about the Zope
mailing list