Search code examples
pythonnavigationploneportlet

Can not arrange item order in Plone 4's navigation portlet


So I added this navigation portlet for one of my folder objects. There are 10 child nodes within this folder. The portlet orders the items by their creation date which I do not want, but I could not find a way to change this order. Do I have to re-added these 10 objects by the order I want or is there something I am missing here?


Solution

  • The default setup sorts items by their container ordering (the getObjPositionInParent index in the catalog).

    You can alter the ordering of items within a container by dragging them by their ordering handle:

    order draghandle in Plone

    This is on the folder contents view (Contents).

    If you need to alter the default sorting parameter because all your content should always be sorted alphabetically or by publication date or similar, you'll have to change the navigation tree parameters in the ZMI; find the portal_properties tool in the ZMI, within which you'll find the navtree_properties property sheet. Change the sortAttribute property to the name of a different catalog index to sort results by.

    If you have created a custom Archetypes folder type, make sure it inherits from plone.app.folder.base.BaseBTreeFolder. When using Dexterity, the plone.dexterity.content.Container base class is orderable by default.