[Product-Developers] reuse plone.global_sections for separate CMFAction Category
Simone Orsi
simahawk at gmail.com
Sat Dec 14 14:28:07 UTC 2013
Hi,
if you already subclassed it you should find this in base class:
https://github.com/plone/plone.app.layout/blob/master/plone/app/layout/viewlets/common.py#L194
the view that retrieves the tabs is defined here
https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/browser/configure.zcml#L54
https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/browser/navigation.py#L160
If you only need to list actions just do like site actions viewlet:
https://github.com/plone/plone.app.layout/blob/master/plone/app/layout/viewlets/common.py#L138
As you note you can get portal actions via @@plone_context_state, like:
context_state = getMultiAdapter((self.context, self.request),
name=u'plone_context_state')
context_state.actions('site_actions')
You can pass your own category to it:
https://github.com/plone/plone.app.layout/blob/master/plone/app/layout/globals/context.py#L232
HTH,
S.
On Sat, Dec 14, 2013 at 1:42 PM, Torsten Kühnel <tdk at fuer-adrian.de> wrote:
> Hi,
>
> i want subclass and adapt the plone.global_sections viewlet to a separate
> set of CMFActions defined in an own category.
>
> in the sections.pt is a tal:define="portal_tabs view/portal_tabs which
> gives the actions from the portal_tabs category. I have my own set of
> actions ready, called local_tabs, but cannot refer to it the same way the
> sections.pt template does, like tal:define="portal_tabs view/local_tabs.
>
> I cannot find out how the view gets to the portal_tabs.
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-product-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20131214/08b3756d/attachment.html>
More information about the Product-Developers
mailing list