Daniel Widerin wrote:
Hello,

I need some portlets to be rendered (i need their rendered html code) in browser view. these portlets expect only one parameter, an object_uid, which i passed to portlet renderer successfully.

Why? :)

It sounds to me like you should just do this with views or ViewPageTemplateFiles or viewlets.

i tried to call the portlet directly and construct the parameters for the render method, but still failed.

You need to be more specific about what you tried.

The general approach should be to get the portlet assignment, make sure it's acquisition-wrapped, and then adapt to IPortletRenderer, making sure the portlet renderer is acquisition wrapped in the context, and then call update() and then render() on it.

You'll need to look at the portlet manager code, in particular _lazyLoadPortlets().

i get a Unauthorized Exception in DC.Bindings as described here: http://plone.org/documentation/error/unauthorized-not-authorized-to-access-binding-context

how do i construct a portlet-manager in python (tried some stuff from plone.portlets.manager already), do i need one?

Probably not, strictly speaking, but portlets weren't really designed to be easily rendered in isolation. It's certainly possible - you could look at some of tests in plone.app.portlets for inspiration - it's just not a use case that's considered particularly important.

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


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

Reply via email to