RE: [Zope3-Users] Re: How can I get a viewlet's docstring from within aviewlet manager?

2008-06-19 Thread Andreas Johnsen
@zope.org Subject: [Zope3-Users] Re: How can I get a viewlet's docstring from within aviewlet manager? Andreas Johnsen wrote: Let's say I have defined 'class MyViewlet(viewlet.ViewletBase)' and registered it with the browser:viewlet directive. The class 'MyViewlet' has a docstring. How can I

[Zope3-Users] How can I get a viewlet's docstring from within a viewlet manager?

2008-06-14 Thread Andreas Johnsen
Hei, Let's say I have defined 'class MyViewlet(viewlet.ViewletBase)' and registered it with the browser:viewlet directive. The class 'MyViewlet' has a docstring. How can I get this docstring from the render() method in a viewlet manager? In the viewlet manager the viewlet instance is an

RE: [Zope3-Users] How can I determine (in code) if the instance isrunning in devmode or not?

2008-05-30 Thread Andreas Johnsen
, 2008 at 04:45:13PM +0200, Andreas Johnsen wrote: I want to insert some extra HTML from a viewlet manager when running in devmode. How can I determine (in code) if the instance is running in devmode or not? from zope.app.appsetup.appsetup import getConfigContext def

[Zope3-Users] How can I determine (in code) if the instance is running in devmode or not?

2008-05-28 Thread Andreas Johnsen
Hei, I want to insert some extra HTML from a viewlet manager when running in devmode. How can I determine (in code) if the instance is running in devmode or not? Best regards, Andreas ___ Zope3-users mailing list Zope3-users@zope.org

[Zope3-Users] Any performance issues with the macro attribute in the z3c:template directive?

2008-02-28 Thread Andreas Johnsen
Hei all Zopers, I find the macro parameter in the z3c:template very useful for working with templates for viewlets and pagelets. I guess it's slower to extract a html-snippet from within a page template file (by including a macro parameter) then including the entire page template file (by not

[Zope3-Users] When should I use z3c.macroviewlet?

2008-02-27 Thread Andreas Johnsen
Hei all Zopers, I try to catch up with all the latest best practices on writing skins and templates for Zope 3 - e.g. transforming from metal macros based templates to viewlets, pagelets, layout templates and content templates (the Z3C way of doing it). All this looks very nice! But there is

RE: [Zope3-Users] When should I use z3c.macroviewlet?

2008-02-27 Thread Andreas Johnsen
Thanks for a quick answer. So in which use cases are z3c.macroviewlet the best option? The idea behind the macroviewlet is the option to let you define only one page template. The macroviewlet allows you to register snippets from this template and the same template could be used as