[Zope] Page Template help

mustapha mustapha at headnet.dk
Tue Aug 12 05:30:25 EDT 2008


I'm not sure I get what you want to do.

It is not the page template that decides about the expression but the 
engine as Philpp explained before.

anyway, I think you are looking for the "compile" method of the 
ExpressionEngine class (look in zope/tales/tales.py). It's there where 
the expressions are parsed.

HTH

Garito wrote:
> Yes, it's ok but I can save n variable definitions with 4 lines of code 
> in 1 point
> Seems quite interesting for me
> 
> Could someone point me were the page template decides if the expression 
> is a standard, string, python, etc one, please? ;)
> 
> 2008/8/11 Philipp von Weitershausen 
> <philipp at weitershausen.de 
> <mailto:philipp at weitershausen.de>>
> 
>     Garito wrote:
>      > Considere this case:
>      >
>      > I have the sking value in the variable at args/Yanged/Skin
>      >
>      > How can I do the equivalent to
>      >
>      >
>     args/Yanged/raiz/Skins/${args/Yanged/Skin}/arbolYanged.css/absolute_url
>      >
>      > ?
>      >
>      > In the python way it will be:
>      >
>      > path(path('string:' +
>      >
>     'args/Yanged/raiz/Skins/${args/Yanged/Skin}/arbolYanged.css/absolute_url'))
>      >
>      > That's returns the expected value but I can't see how to do with your
>      > propossed way
> 
> 
>     <a tal:define="skin args/Yanged/Skin;
>                    file args/Yanged/raiz/Skins/?skin/arbolYanged.css"
>        tal:attributes="href file/absolute_url">
> 
>     _______________________________________________
>     Zope maillist  -  Zope at zope.org
>     <mailto: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
> Zope Smart Manager
> http://blogs.sistes.net/Garito/670
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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 )



More information about the Zope mailing list