[Zope3-Users] Re: How to make a new namespace for pagetemplates?
Philipp von Weitershausen
philipp at weitershausen.de
Fri Sep 8 07:51:38 EDT 2006
Martin Aspeli wrote:
> FB-5 wrote:
>>>> 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.
>>> Why not use a piece of javascript to do this? See the linkpopper
>>> product on plone.org for a way to process all links in a page and
>>> process them. That product makes external links open in a new window,
>>> but the code should be easy to alter.
>> Thank you for the hint.
>>
>> But there are several reasons for not using JS:
>> * One of the constraints of that site is javascript being optional.
>> Problem ist: marked links are mandatory - they have to be marked
>> even with javascript turned off.
>> * I'd like to have a tag-postprocessing namespace for some other
>> reasons, too - e.g. for a printing-view that automatically creates
>> a list of links at the end of the page.
"Post processing" literally screams WSGI middleware to me.
>> * I'd like to know, how to make a new pagetemplate namespace :-).
Be open minded, Frank :). I think you really just want a more convenient
spelling for generating URLs -- which is absolutely
> It's fairly annoying to have to change every view that may or may not parse
> links, though. Think also about the case when links are coming from HTML
> (possibly transformed from some other format?) inside some content object
> rendered via a view.
>
> Look at zope.contentprovider, though. It sets up the provider: namespace.
> It's fairly simple.
That's a new TALES expression type. It's not what Frank originally wants
(he wants a custom tal/metal/i18n like namespace for PageTemplates which
is nearly impossible -- and unnecessary). But the pointer to the
zope.contentprovider package is good indeed because in my earlier reply
I suggested to write a custom TALES expression type and the
zope.contentprovider package sets one up.
Philipp
More information about the Zope3-users
mailing list