On 17-11-2009 at 18:42:50 Iván Montes <drsl...@pollinimini.net> wrote:

After looking at the wiki page examples, couldn't we solve this with
specialized tales modifiers?

This is taken straight from one of my pages:

<a tal:condition="php:pager.getNumberOfPages() GT 1 AND pager.getCurrentPage() LT pager.getNumberOfPages()-1" href="${php:pager.getURL(pager.getNumberOfPages())}#p${latest_post/id}">Last »</a>

I could replace it with one-off special modifier, or redundant method in pager class, but I'm not sure if that's the best thing to do, and definitely it's not on path of least resistance.

Why not write it like this:

<a tal:condition="pager/getNumberOfPages GT 1 AND pager/getCurrentPage LT pager/getNumberOfPages-1" href="${pager/getURL(pager/getNumberOfPages)}#p${latest_post/id}">Last »</a>


regards, Kornel

PHPTAL mailing list

Reply via email to