Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove portal properties #191

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions news/125.breaking
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Remove use of portal_properties.
Theoretically we were using this for sorting the navigation portlet.
[maurits]
11 changes: 0 additions & 11 deletions plone/app/portlets/portlets/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,6 @@ def __init__(self, context, portlet):
self.context = context
self.portlet = portlet

portal_properties = getToolByName(context, "portal_properties")
navtree_properties = getattr(portal_properties, "navtree_properties")

# Acquire a custom nav query if available
customQuery = getattr(context, "getCustomNavQuery", None)
if customQuery is not None and safe_callable(customQuery):
Expand Down Expand Up @@ -443,14 +440,6 @@ def __init__(self, context, portlet):
# Only list the applicable types
query["portal_type"] = typesToList(context)

# Apply the desired sort
sortAttribute = navtree_properties.getProperty("sortAttribute", None)
if sortAttribute is not None:
query["sort_on"] = sortAttribute
sortOrder = navtree_properties.getProperty("sortOrder", None)
if sortOrder is not None:
query["sort_order"] = sortOrder

# Filter on workflow states, if enabled
registry = getUtility(IRegistry)
navigation_settings = registry.forInterface(INavigationSchema, prefix="plone")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup


version = "5.0.8.dev0"
version = "6.0.0.dev0"

setup(
name="plone.app.portlets",
Expand Down