Skip to content

Commit 3d350f0

Browse files
committed
basic information about portal_actions
1 parent 612ffcd commit 3d350f0

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

docs/backend/portal-actions.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,102 @@ myst:
1111

1212
# Portal Actions
1313

14+
## What are "Actions" in Plone
15+
16+
Actions are links or buttons that allow users to perform specific actions on your site.
17+
These actions can be anything from viewing a content item to editing a page, to accessing a specific feature of your site.
18+
19+
```{note}
20+
There are at least two providers for actions, the `portal_actions` tool and the content type actions defined in the several Factory Type Information's under the `portal_workflow` tool.
21+
Here the portal actions are described.
22+
```
23+
24+
Portal actions are typically displayed in the site's navigation menu or toolbar and can be accessed by users with the appropriate permissions.
25+
26+
Portal actions are managed using the "Portal Actions" control panel in Plone.
27+
This control panel allows you to add, edit, and delete actions, as well as organize them into categories and control where they are available on your site.
28+
29+
## Anatomy of a Portal action
30+
31+
A portal action in Plone consists of a few different components, including the category, title, description, URL, and control parameters.
32+
33+
The action title is the text that is displayed for the action in the site's navigation menu or toolbar.
34+
This text should be descriptive and indicate what the action does.
35+
The description is used as an additional text shown when hovering over the link.
36+
The title and description can be translated using the translation system of Plone.
37+
Therefore the i18n domain can be set here.
38+
39+
The Action URL is the address of the page or feature that the action will access when it is clicked.
40+
This can be an internal page on your site or an external page on another website.
41+
42+
The "Condition" controls whether to show the action or not.
43+
44+
You can use expressions in the URL of an action to make the action more dynamic and flexible. Expressions are also used for the "Condition".
45+
46+
The permissions chosen also control the visibility of an action.
47+
48+
Visibility can be used to hide actions.
49+
This can be handy to disable default actions or temporarily disable actions.
50+
51+
The "Position" is used to order action within their category and is numbered starting with "1".
52+
53+
Together, these components make up a portal action in Plone.
54+
55+
You can use the "Portal Actions" control panel to manage and organize your site's actions.
56+
57+
## Action categories
58+
59+
Several different action categories are used for different purposes.
60+
These categories include:
61+
62+
- *Object Actions*: actions that are available when viewing a specific content item
63+
- *Object Buttons*: actions that are displayed as buttons when viewing a specific content item
64+
- *Portal Tabs*: actions that are displayed as tabs on the top of the page
65+
- *Site Actions*: actions that are available on every page of your site
66+
- *User Actions*: actions that are available to users when they are logged in to your site
67+
68+
Each of these action categories serves a different purpose and is intended for use in specific areas of the site.
69+
For example, object actions are intended for actions that are specific to a particular content item, while site actions are intended for actions that are available on every page of your site.
70+
71+
## Expressions
72+
73+
An expression is a piece of code that is evaluated at runtime and can be used to insert dynamic values into the URL or provide the decision for the condition.
74+
75+
```{todo}
76+
Contribute to this documentation!
77+
A chapter about expressions is missing. As soon as it exists a link to this chapter needs to be placed here.
78+
See issue [Backend > missing chapter Expressions needs content](https://github.com/plone/documentation/issues/1370).
79+
```
80+
81+
## Adding or editing portal actions
82+
83+
To add or edit portal actions, you can use the "Portal Actions" control panel.
84+
To access this, log in to your Plone site as a user with the appropriate permissions, and then go to the "Site Setup" page.
85+
From there, click on the "Portal Actions" link in the "Plone Configuration" section.
86+
87+
Once you are on the "Actions" control panel, you will see a list of all the existing portal actions for your site.
88+
To add a new action, click on the "Add new action" button at the top of the page.
89+
This will open a form where you can enter the details for your new action, such as the action name, URL, and any additional parameters.
90+
91+
To edit an existing action, click on the action name in the list to open the action's details page.
92+
From there, you can edit the action's properties, such as the name, URL, and parameters.
93+
94+
It's important to note that the ability to add or edit portal actions is only available to users with the appropriate permissions.
95+
If you do not have the necessary permissions, you will not be able to access the "Portal Actions" control panel.
96+
97+
## Exporting or importing portal actions
98+
99+
You can export action configuration to XML using the built-in GenericSetup export.
100+
101+
Then this XML can be imported again within a profile of an add-on package.
102+
Place the file as `actions.xml` in the profile of an add-on.
103+
You can cut out snippets from this file for creating `actions.xml` containing only changed or added parts.
104+
105+
To export all actions:
106+
107+
- Go to "Site Setup" and choose "Management Interface"
108+
- Go to "portal_setup"
109+
- Click the tab "Export"
110+
- Choose "Actions Providers"
111+
- Click the "Export selected steps" button at the end of the page
112+

0 commit comments

Comments
 (0)