Skip to content

Commit d64d4dc

Browse files
authored
Merge branch '6.0' into update-uv-addon-installation
2 parents 3ac5655 + 8b37ac9 commit d64d4dc

9 files changed

Lines changed: 37 additions & 34 deletions

File tree

.github/workflows/build_deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: docs.plone.org
1616
url: https://docs.plone.org
1717
steps:
18-
- uses: actions/checkout@v6
18+
- uses: actions/checkout@v7
1919
- name: Setup Graphviz
2020
uses: ts-graphviz/setup-graphviz@v2
2121
- name: Set up Python 3.12
@@ -39,7 +39,7 @@ jobs:
3939
run: make deploy
4040

4141
- name: Use Node.js ${{ env.node-version }}
42-
uses: actions/setup-node@v6
42+
uses: actions/setup-node@v7
4343
with:
4444
node-version: ${{ env.node-version }}
4545

@@ -54,7 +54,7 @@ jobs:
5454
run: |
5555
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
5656
57-
- uses: actions/cache@v5
57+
- uses: actions/cache@v6
5858
name: Setup pnpm cache
5959
with:
6060
path: ${{ env.STORE_PATH }}

.github/workflows/rtd-pr-preview.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v6
9+
- uses: actions/checkout@v7
1010

1111
- name: Set up Python ${{ matrix.python-version }}
1212
uses: actions/setup-python@v6

.github/workflows/update_submodule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
# Checkout
12-
- uses: actions/checkout@v6
12+
- uses: actions/checkout@v7
1313
with:
1414
ref: 6.0
1515
submodules: true

docs/classic-ui/portlets.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ As a user, you can add a portlet to a web page in a Plone site by following thes
4040
If you do not see the {guilabel}`Manage portlets` link, you may need to contact the site administrator to request access.
4141

4242
3. In the {menuselection}`Add portlets` menu, select the portlet type that you want to add, and click the {guilabel}`Add` button.
43-
This will open a form to edit the settings for the selected portlet type.
43+
This will open a form to edit the settings for the selected portlet type.
4444

4545
4. Click the {guilabel}`Save` button to save your changes and add the portlet to the web page.
4646
This adds the portlet to the list of {guilabel}`Portlets assigned here` on the screen.
@@ -50,7 +50,6 @@ As a user, you can add a portlet to a web page in a Plone site by following thes
5050
The {guilabel}`X` button deletes the portlet.
5151
These options will only appear at the root from which the object inherits its settings.
5252

53-
5453
## Writing a custom Portlet
5554

5655
To create a portlet, you will need to write Python classes that define the portlet and its behavior.
@@ -202,3 +201,29 @@ These values should match the corresponding classes and interfaces defined in th
202201
This file registers the `MyPortlet` class as a portlet with Plone. It also specifies the portlet's name, title, description, and category.
203202

204203
For more examples of how to write and register portlets, look at the source code of the Plone core package [`plone.app.portlets`](https://github.com/plone/plone.app.portlets), or of other Plone add-ons that include portlets.
204+
205+
## Call one portlet by URL
206+
207+
To call a portlet by its URL, for example, to update it via an AJAX call, use the `@@render-portlet` view in your portlet renderer with `portlethash` as a query parameter.
208+
209+
The following example shows how to construct a reload URL for a portlet.
210+
211+
```python
212+
from plone.app.portlets.portlets.base import Renderer
213+
from Products.CMFPlone.utils import safe_unicode
214+
215+
216+
class BasePortletRenderer(Renderer):
217+
@property
218+
def hash(self):
219+
portlethash = self.request.form.get(
220+
"portlethash", getattr(self, "__portlet_metadata__", {}).get("hash", "")
221+
)
222+
return portlethash
223+
224+
@property
225+
def reload_url(self):
226+
base_url = self.context.absolute_url()
227+
hash = safe_unicode(self.hash)
228+
return f"{base_url}/@@render-portlet?portlethash={hash}"
229+
```

requirements-initial.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# requirements-initial.txt
2-
# From https://dist.plone.org/release/6.2.0/constraints.txt
3-
pip==26.1.1
2+
# From https://dist.plone.org/release/6.2.1/constraints.txt
3+
pip==26.1.2
44
setuptools==81.0.0
55
wheel==0.47.0

submodules/volto

Submodule volto updated 170 files

0 commit comments

Comments
 (0)