Re: [Zope3-Users] Re: How to make a new namespace for pagetemplates?
On 9/8/06, Philipp von Weitershausen [EMAIL PROTECTED] wrote: * Solution outside of Zope. Martijn suggested a JavaScript. If you need it to work for non-JavaScript browsers, I suggest a WSGI middleware that checks for text/html data and transforms a elements as needed. You could do the transformation in XSLT or Python (e.g. via elementtree). Or do as zc.resourcelibrary does; implement a subclass of BrowserResponse that does the transformation for you. Then override the default request (so it'll use your response). See http://svn.zope.org/zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py?rev=69889view=auto and http://svn.zope.org/zc.resourcelibrary/trunk/src/zc/resourcelibrary/configure.zcml?rev=68929view=auto -- Martijn Pieters ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: How to make a new namespace for pagetemplates?
Hi, On Fri, Sep 08, 2006 at 01:45:45PM +0200, Philipp von Weitershausen wrote: [snip] Write a new TALES expression type (like string: or python:) that constructs link tags. This could like: a tal:replace=structure link:context/url context/urldescription link goes here /a The link: expression would split the argument string, take the first part as the URL and the second one as the link description. Both would be fed through the PathExpression so that they're evaluated. Custom TALES expression types are components providing zope.tales.interfaces.ITALESExpression. Look at zope.tales.expressions for the implementation of the standard TALES expressions. Perfect :-) . That's what I'll do. Thank you, Frank ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users