[Zope3-Users] How to make a new namespace for pagetemplates?
FB
fbo2 at gmx.net
Fri Sep 8 06:37:36 EDT 2006
Hi,
my employer want to have all external links marked with a small icon telling
anonymous users from the internet that everything behind given links is
beyond our responsibility.
Currenty I have to do something like that:
<a tal:define="linkwriter nocall:context/@@linkwriter"
tal:replace="structure linkwriter.link(context.url,text=context.urldescription)" />
... which doesn't really looks like a nice method to produce i.e. this:
<a class="external" title="You're leaving out institute's domain. We're not responsible!"
href="http://example.com">This is an example company</a>
The 'linkwriter' chooses the a-tag's class and title according to the domain of the href.
I would like to make writing those pagetemplates a bit easier - maybe like that:
<a tal:attributes="href context/url" tal:content="context/urldescription"
linkwriter:marklink="" />
How complicated is it to write an additional pagetemplate namespace which is able to
"postprocess" a tag, after 'tal', 'i18n' and 'metal' did their work?
Thank you,
Frank
More information about the Zope3-users
mailing list