|
1 | 1 | --- |
2 | 2 | myst: |
3 | 3 | html_meta: |
4 | | - "description": "" |
5 | | - "property=og:description": "" |
6 | | - "property=og:title": "" |
7 | | - "keywords": "" |
| 4 | + "description": "Actions are links or buttons that allow users to perform specific actions on your site." |
| 5 | + "property=og:description": "Actions are links or buttons that allow users to perform specific actions on your site." |
| 6 | + "property=og:title": "Portal Actions" |
| 7 | + "keywords": "Portal Actions, actions, Plone, backend" |
8 | 8 | --- |
9 | 9 |
|
10 | 10 | (backend-portal-actions-label)= |
11 | 11 |
|
12 | 12 | # Portal Actions |
13 | 13 |
|
| 14 | +Actions are links or buttons that allow users to perform specific actions on your site. |
| 15 | +These actions can be anything from viewing a content item to editing a page, to accessing a specific feature of your site. |
| 16 | + |
| 17 | +```{note} |
| 18 | +Actions in Plone are provided by action providers. |
| 19 | +There are at least two providers for actions. |
| 20 | +
|
| 21 | +- Portal actions, provided by the actions tool named `portal_actions` in the ZMI |
| 22 | +- Content type actions defined by the Factory Type Information (FTI) of the Types Tool, and named `portal_types` in the ZMI |
| 23 | +
|
| 24 | +Here only the portal actions are described. |
| 25 | +``` |
| 26 | + |
| 27 | +Portal actions are typically displayed in the site's navigation menu or toolbar and can be accessed by users with the appropriate permissions. |
| 28 | + |
| 29 | +Portal actions are managed using the {guilabel}`Portal Actions` control panel in Plone. |
| 30 | +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. |
| 31 | + |
| 32 | +```{note} |
| 33 | +We use the terms "Portal actions" and "Actions" in this documentation to mean the same thing. |
| 34 | +``` |
| 35 | + |
| 36 | +## Anatomy of a Portal action |
| 37 | + |
| 38 | +A portal action in Plone consists of a few settings, including the category, title, description, URL, and control parameters. |
| 39 | + |
| 40 | +The action {guilabel}`Title` is the text that is displayed for the action in the site's navigation menu or toolbar. |
| 41 | +This text should be descriptive and indicate what the action does. |
| 42 | +The {guilabel}`Description` is used as an additional text shown when hovering over the link. |
| 43 | +The {guilabel}`Title` and {guilabel}`Description` can be translated using the translation system of Plone. |
| 44 | +Therefore the {guilabel}`I18n domain` can be set here. |
| 45 | + |
| 46 | +The {guilabel}`Action URL` is the address of the page or feature that the action will access when it is clicked. |
| 47 | +This can be an internal page on your site or an external page on another website. |
| 48 | + |
| 49 | +The {guilabel}`Condition` controls whether to show the action or not. |
| 50 | + |
| 51 | +You can use expressions in the URL of an action to make the action more dynamic and flexible. |
| 52 | +Expressions are also used for the {guilabel}`Condition`. |
| 53 | + |
| 54 | +The {guilabel}`Permissions` chosen also control the visibility of an action. |
| 55 | + |
| 56 | +The {guilabel}`Visible?` setting can be used to show or hide actions. |
| 57 | +This can be handy to disable default actions or temporarily disable actions. |
| 58 | + |
| 59 | +The {guilabel}`Position` setting is used to order actions within their category, and is numbered starting with `1`. |
| 60 | + |
| 61 | +Together, these components make up a portal action in Plone. |
| 62 | + |
| 63 | +You can use the {guilabel}`Portal actions` control panel to manage and organize your site's actions. |
| 64 | + |
| 65 | +## Action categories |
| 66 | + |
| 67 | +Several action categories are used for different purposes. |
| 68 | +These categories include: |
| 69 | + |
| 70 | +Object Actions |
| 71 | +: Actions that are available when viewing a specific content item. |
| 72 | + |
| 73 | +Object Buttons |
| 74 | +: Actions that are displayed as buttons when viewing a specific content item. |
| 75 | + |
| 76 | +Portal Tabs |
| 77 | +: Actions that are displayed as tabs on the top of the page. |
| 78 | + |
| 79 | +Site Actions |
| 80 | +: Actions that are available on every page of your site. |
| 81 | + |
| 82 | +User Actions |
| 83 | +: Actions that are available to users when they are logged in to your site. |
| 84 | + |
| 85 | +Each of these action categories serves a different purpose and is intended for use in specific areas of the site. |
| 86 | +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. |
| 87 | + |
| 88 | +## Expressions |
| 89 | + |
| 90 | +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. |
| 91 | + |
| 92 | +```{todo} |
| 93 | +Contribute to this documentation! |
| 94 | +A chapter about expressions is missing. As soon as it exists a link to this chapter needs to be placed here. |
| 95 | +See issue [Backend > missing chapter Expressions needs content](https://github.com/plone/documentation/issues/1370). |
| 96 | +``` |
| 97 | + |
| 98 | +## Adding or editing portal actions |
| 99 | + |
| 100 | +To add or edit portal actions, you can use the {guilabel}`Portal actions` control panel. |
| 101 | +To access this, log in to your Plone site as a user with the appropriate permissions. |
| 102 | +Then select the menu item {menuselection}`[username] > Site Setup`. |
| 103 | +From there, click on the {guilabel}`Actions` link in the {guilabel}`General` section. |
| 104 | +You can also select {menuselection}`General > Actions` from the Site Setup or any other control panel. |
| 105 | + |
| 106 | +Once you are on the {guilabel}`Portal actions` control panel, you will see a list of all the existing portal actions for your site. |
| 107 | +To inspect or edit an existing action's settings, click its {guilabel}`Edit` button. |
| 108 | + |
| 109 | +```{image} /_static/backend/control-panel-action-edit-settings.png |
| 110 | +:alt: Action Settings editing interface |
| 111 | +``` |
| 112 | + |
| 113 | +To add a new action, click on the {guilabel}`Add new action` button at the top of the page. |
| 114 | +This will open a form where you can select its category and enter an arbitrary ID. |
| 115 | +Click the {guilabel}`Add` button to add the action. |
| 116 | +The new action should now appear in the actions listing under the selected category. |
| 117 | +You can now edit its settings by clicking its {guilabel}`Edit` button. |
| 118 | + |
| 119 | +It's important to note that the ability to add or edit portal actions is only available to users with the appropriate permissions. |
| 120 | +If you do not have the necessary permissions, you will not be able to access the {guilabel}`Portal actions` control panel. |
| 121 | + |
| 122 | +## Exporting or importing portal actions |
| 123 | + |
| 124 | +You can export action configuration to XML using the built-in Generic Setup Tool export. |
| 125 | + |
| 126 | +Then this XML can be imported again within a profile of an add-on package. |
| 127 | +Place the file as `actions.xml` in the profile of an add-on. |
| 128 | +You can cut out snippets from this file for creating `actions.xml` containing only changed or added parts. |
| 129 | + |
| 130 | +To export all actions: |
| 131 | + |
| 132 | +- Go to {guilabel}`Site Setup` and choose {guilabel}`Management Interface`. |
| 133 | + You can also select {menuselection}`Advanced > Management Interface` from the Site Setup or any control panel. |
| 134 | +- Click {guilabel}`portal_setup`. |
| 135 | +- Click the tab {guilabel}`Export`. |
| 136 | +- Tick the checkbox {guilabel}`Actions Providers`. |
| 137 | +- Click the button {guilabel}`Export selected steps` at the end of the page. |
| 138 | + |
0 commit comments