providing my own content actions and category

Replies: 0
Up one level
Pages: [1]
providing my own content actions and category
« on: January 26, 2010 04:01:34 +0000 »

I want to provide my own actions for a certain container content type. Default actions portlet behavior is to show contained types like this:

Add content
    Add foobar
    Add foobar2

I was able to add an extra section to actions portlet like this:

Phases
    Add foobar
    Add foobar2

The problem is that I cannot disable the "Add content" category and it's actions ( thus leaving "Phases" category and it's custom actions)

So, I could not find a way to do this with current support so I figure out that something like this might make sense

1. Mark content type with interface "INoAddContentAction" (or something like that)
2. in "class AddContentActions(ContentAction)" - content.actions.contentactions.py (152) do something like:

        for ct in self.contenttype.listContainedTypes():
            if not INoAddContentAction.providedBy(ct):
                weight = weight + 1
                yield AddContent(context, request, ct, weight)




Actions

Notifications