--On 28. August 2008 13:01:42 +0200 Hedley Roos <[EMAIL PROTECTED]> wrote:

Hi Andreas

I'm porting old code and I need to call a macro that now lives in a
viewlet (or more correctly in the page template that is rendered by
the viewlet). The macro call is from trusted code (I handle an ajax
call), so I have access to the whole API.

I assume that viewlet manager are registered as named utilities, so you might be able to lookup the related viewlet manager first using

vm = getUtility(IViewletManager, name='portal.xxxxx')

According to the zope.viewlet documentation you can access the associated
viewlets directly using

vm[viewlet_name]

Check with the zope.viewlet doctests in README.txt.

-aj

Attachment: pgpR44I3TpuZv.pgp
Description: PGP signature

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to