--On 28. August 2008 13:28:06 +0200 Andreas Jung <[EMAIL PROTECTED]> wrote:



--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')


Your solution is possibly the right one (using multi adapters). Also the metaconfigure.zcml of zope.viewlet indicates that viewlet managers must be looked up as named (multi) adapters.

Andreas

Attachment: pgpiKXnJbotOy.pgp
Description: PGP signature

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

Reply via email to