Re-arrange TreeMultiselectField items

Silverstripe Version: 4.3


Not sure if this is possible, I would like to be able to re-arrange the selected items in a TreeMultiselectField.

I currently have a field where I can select pages on the site and they will then show the links on the page.

$fields->addFieldToTab('Root.Main', TreeMultiselectField::create('OtherResources','Other useful PEO resources',SiteTree::class),'PageType');
<% if $OtherResources %>
<h2>Other useful PEO resources</h2>
<ul class="items">
	<% loop $OtherResources %>
		<a href="$Link"> ... </a>
	<% end_loop %>
<% end_if %>

This is working fine but it shows in order of content ID. I can sort it via ASC or DESC but what I would prefer to do is set it either by the order the page was selected or by rearranging within the field.

Is this possible?

If it is not possible, is there a module that would achieve this?

Thank you.

I solved this by using kinglozzer/silverstripe-multiselectfield

The documentation explains implementation pretty well but am happy to help if others need assistance.