[Zope3-Users] Re: Still a skinning problem
Florian Lindner
mailinglists at xgm.de
Sun Feb 11 03:29:34 EST 2007
Am Donnerstag, 8. Februar 2007 17:23 schrieb FB:
> Hi,
>
> On Thu, Feb 08, 2007 at 04:54:51PM +0100, Florian Lindner wrote:
> > Am Mittwoch, 7. Februar 2007 07:50 schrieb Jürgen Kartnaller:
> > > Florian,
> > > if you want the url to your current site implement this :
> > >
> > >
> > > class SiteUrlView(object):
> > >
> > > def __call__(self):
> > > return absoluteURL(hooks.getSite(), self.request)
> > >
> > > And register a page :
> > >
> > > <page
> > > name="site_url"
> > > for="*"
> > > class=".views.SiteUrlView"
> > > permission="zope.Public"
> > > />
> > >
> > > Now you can use context/@@site_url anywhere.
> >
> > Hi,
> > this works perfect when using it like:
> >
> > <a tal:attributes="href context/@@site_url">home</a>
> >
> > but when I try to directly link to a view registered with the object
> > site_url returns:
> >
> > <a tal:attributes="href context/@@site_url/@@search.html">suche</a>
>
> Try
>
> <a tal:attributes="href
> string:${context/@@site_url}/@@search.html">suche</a>
Yes, thanks, works!
Florian
More information about the Zope3-users
mailing list