[Zope] Sharing images between different sites

John Poltorak jp at warpix.org
Thu Nov 18 07:45:27 EST 2004


On Thu, Nov 18, 2004 at 03:19:32AM +0000, Cliff Ford wrote:
> Your page template should have a plain text img tag:
> 
> <img src="/images/logo" width=xxx height=yyy alt="caption">


This doesn't work either. I get:-
 

    *  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 164, in __init__
    * Module Products.PageTemplates.Expressions, line 114, in __init__

CompilerError: Invalid variable name "<img src="" (Also, an error occurred 
while attempting to render the standard error message.)

This is probably Plone related so I'll as on the Plone list.
 
> 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



-- 
John




More information about the Zope mailing list