Skip to content

Commit

Permalink
Merge pull request #132 from plone/fix-relateditems-sort
Browse files Browse the repository at this point in the history
fix: Sort relateditems tree by sortable_title
  • Loading branch information
vangheem committed Feb 25, 2016
2 parents 8d52223 + 02d740d commit 89c00e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Fixes:
- Ensure we have all content for tree query in relateditems
[Gagaro]

- Sort relateditems tree by sortable_title.
[Gagaro]

2.0.3 (2016-02-14)
------------------
Expand Down
4 changes: 3 additions & 1 deletion plone/app/widgets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ def get_relateditems_options(context, value, separator, vocabulary_name,
'treeVocabularyUrl',
'{}/@@getVocabulary?name=plone.app.vocabularies.Catalog'.format(
portal is not None and portal.absolute_url() or '')
)
)
options.setdefault('sort_on', 'sortable_title')
options.setdefault('sort_order', 'ascending')

nav_root = getNavigationRootObject(context, get_portal())
options['rootPath'] = (
Expand Down

0 comments on commit 89c00e1

Please sign in to comment.