On 11/11/10 12:05 , Mike Orr wrote:
Since HTML is all about hyperlinks, it makes sense to give them special treatment, especially if you're trying to encourage people to always use URL generation rather than literal URLs for internal links, as Pylons does.
Stick a py:with="u=request.route_url" at the top of you template if you want brevity?
My standard pattern is to expose a 'tools' object to templates which has a number of functions such as route_url, model_url, etc. for use in templates. I've never felt that having to spell <a href="${tools.route_url('personal+settings')}">..</a> is too long or awkward.
Wichert. -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-de...@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.