This forum has moved, please join us on github discussions. We will keep these old posts available for reference. Thank you!

Sort your pieces "by hand": apostrophe-pieces-orderings-bundle released!

This module lets you manually assign an order to pieces. You can use such manually created orderings with apostrophe-pieces-widgets, apostrophe-pieces-pages, and your own code that fetches pieces via cursors.

And you can also choose to put one of the orders into effect as the “default ordering,” meaning that it applies to all queries that don’t specify an explicit sort or use their own ordering.

In addition, your explicitly ordered pieces will have a _viaOrdering property set to true, so you can easily visually distinguish them in your index.html template if you choose.

With apostrophe-pieces-pages, the explicitly ordered pieces appear first, followed by the others in the default sort order for that type of piece. But, this is done with proper pagination. So you can use this module to “feature” pieces sitewide without worrying about duplication on every page.

For all the details, check out apostrophe-pieces-orderings-bundle on NPM.