Change order of multivalues within a property?

Is it possible to rearrange the values within a property? I am carefully entering many values to a property field, because I want to show them in a certain order. When I missed one and want to enter a value later in between the existing values, it doesn’t seem there is a way.

2 Likes

I’m still looking for a solution for this. I am entering many values in the Relation field (dcterms:relation), and want to change the order of the entered values. Sometimes I enter over 50 values in this field, so deleting and starting over is not a solution.

I see that, with media files, you can reorder them, but not with any of values. It would be great if you can.

1 Like

I miss this feature, too! Reorder like medias would be so great. As work around I did the reoder (sorting) in my theme.

Could you explain how you used the theme to reorder values?

I use Omeka S - would it still be possible?

Of course this also works with Omeka S. In my theme I have edited the file show.phtml

By default a function
$item->displayValues();

is called. I have commented this out and get all attributes manually. For example like this:

$collectionItems = $item->value('dcterms:hasPart', array(
        all' => true
    ));

I can then sort the array $collectionItems as I like and then output the values. I know it is tedious, because you have to query all attributes one by one. Maybe someone here knows a hint.
My other consideration was to adapt the function displayValues() in the class

Omeka\Api\Representation\AbstractResourceEntityRepresentation

But with an update my changes would be overwritten again. So I moved it to the theme. In the backend the sorting is unfortunately still by id