Hi Nicola,

I'm now developing a little tool using plone 3 and kss, something like "drag
and drop" behavour.

Cool - I'm interested in that. Which toolkit are you using?

I need to obtain a portlet reference by its hash code.

<snip code />

How to obtain this portlet reference? Varius portlet must have different
menu ;)

Are you asking how to get a portlet hash, or how to turn a portlet hash into an actual portlet?

If you have a hash, you can get a portlet info dict from plone.portlets.utils.unhashPortletInfo()

With this info, you can call plone.app.portlets.utils.assignment_from_key() which returns an IPortletAssignment.

Look at plone.app.portlets.browser.kss to see how it's used. If you need to render the assignment, multi-adapt assignment.data to IPortletRenderer.

The hashes themselves are stored in the page template. You can use a kssAttr() type attribute to find them and send them to the server-side action.

Martin


--
Acquisition is a jealous mistress


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

Reply via email to