WebApps - Multi-Data Source Output Order
Currently, items selected in a Multi-Datasource field output in your layout in the order of their ID's.
You CAN write about 30 lines of liquid to control the order in which they appear, but most people can't do that, and you have to drop it into each place you're gonna do it. Not great.
Wouldn't it be great to have a param in the datasource tag something like "sort_order" where you could designate "selected". Like this below (see end of tag).
{% assign itemids = this['Content Blurbs'] | join: ',' -%}{% include 'webapp', id: '17', itemids: itemids, layout: 'default', datasource: 'true', sortorder:'selected/id/asc/dsc' -%}
This would output those items in the order they were selected in the Admin.
Bonus points: Allow for drag/drop re-ordering of items in the admin (but very much a nice to have).
Log in to comment and vote
Comments8
Jul 10, 2024
This has been released now - v2.8.2.5 - https://help.siteglide.com/en/article/245-module-system-files-changelog - https://developers.siteglide.com/webapp-list-layouts#:~:text=sort_type%3A%20%27item_ids%27
Jul 10, 2024
Devon Reehl
Sep 26, 2023
Matt Walter I brought this up at a town hall in the past couple months, but wanted to follow up on this roadmap item with a specific video around the Drag and Drop functionality (which would solve this).
Here are the details: https://www.loom.com/share/4d4bdd59e0f747a8970a47c16617ca98?sid=fb35f6cd-eede-42ac-908d-a3f60f7d1844
Matt Walter
Nov 20, 2023
Devon Reehl: Thanks for the video. I'll take a look and see if we can change the field to be the same as the image array one you suggested.
Devon Reehl
Nov 20, 2023
Matt Walter: Thanks Matt!
Apr 6, 2022
Matt Jones
Jan 6, 2020
To give an example of this- the Client selects Source D at index 0, and Source C at index 1 in the array. The question is- can the data-source items "remember" their place in the array, and be outputted in that order?
The purpose of this request is to find a faster way for the Client to control weighting on a large-scale site.
Please correct me if I've explained that wrongly Devon Reehl !
Matt Walter
Dec 12, 2019
Devon Reehl - Do the parameters here not achieve that? -> https://siteglide.support/en/articles/3478503-webapp-list-layouts
sorttype and sortorder