[Zope] URL_Rewrite

Garito garito at sistes.net
Thu Aug 16 14:54:35 EDT 2007


Or as I previously say:

python: url_quote(path("here/Our_Store/CheckOutAfterEditStuff"))

Where path is a method that evaluates a string as a tales expresion like
this

2007/8/16, Peter Bengtsson <peter at fry-it.com>:
>
> In TAL this::
>
>   python:url_quote(here/Our_Store/CheckOutAfterEditStuff)"
>
> means
>
>    here <dividedby> Our_Store <dividedby> CheckOutAfterEditStuff
>
> What you need is::
>
>   python:url_quote(here.Our_Store.CheckOutAfterEditStuff())"
>
> tonylabarbara at aol.com wrote:
> > I have this line of code:
> >
> > <a tal:define="std modules/Products.PythonScripts.standard; url_quote
> > nocall: std/url_quote; x python:url_quote(here/CheckOutAfterEditStuff)"
> > tal:attributes="href
> > string:${here/renumberTheCart/absolute_url}?doc=${x}">test</a>
> >
> > but I get this error:
> >
> > *Error Type: NameError
> > Error Value: name 'CheckOutAfterEditStuff' is not defined*
> >
> > So I tried this:
> >
> > <a tal:define="std modules/Products.PythonScripts.standard; url_quote
> > nocall: std/url_quote; x
> > python:url_quote(here/Our_Store/CheckOutAfterEditStuff)"
> > tal:attributes="href
> > string:${here/renumberLarimanCart/absolute_url}?doc=${x}">test</a>
> >
> > and I got the same error, although now it can't find "Our_Store". Now,
> > "Our_Store" is the container for this PT and "CheckOutAfterEditStuff" is
> > in the same container. What am I doing wrong?
> > TIA,
> > Tony
> > ------------------------------------------------------------------------
> > AOL now offers free email to everyone. Find out more about what's free
> > from AOL at *AOL.com* <http://www.aol.com?ncid=AOLAOF00020000000437>.
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Zope maillist  -  Zope at zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )
>
> --
> Peter Bengtsson,
> work www.fry-it.com
> home www.peterbe.com
> hobby www.issuetrackerproduct.com
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>



-- 
Mis Cosas
http://blogs.sistes.net/Garito
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070816/4e91810c/attachment.htm


More information about the Zope mailing list