6
WebApps - Multi-Data Source Output Order
planned
Devon Reehl
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 item_ids = this['Content Blurbs'] | join: ',' -%}
{% include 'webapp', id: '17', item_ids: item_ids, layout: 'default', datasource: 'true', sort_order:'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
Activity
Newest
Oldest
Matt Jones - Siteglide
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
planned
Matt Walter
@Devon Reehl - Do the parameters here not achieve that? -> https://siteglide.support/en/articles/3478503-webapp-list-layouts
sort_type and sort_order