Adding "Sort By" fields to admin and public sites

I’m using the Default Sort plugin so that items can be sorted by Dublin Core Date instead of Date Added. However, I’m having a hard time finding info on how to add this (I’d like to be able to sort by Date in both the admin and public site).

The plugin site says this, but I’m really not sure what they’re getting at:

It would probably be a good idea to add whichever sort field you select to sort by to the list of sort links in your browse views. Take a look at the Omeka default theme for an example of how this can be done:

/Omekaroot/themes/default/items/browse

For public side, this is what I did to my item/browse.php file in the theme (modified from Seasons theme):

<?php if ($total_results > 0): ?>

<?php
$sortLinks[__('Date')] = 'Dublin Core,Date';
$sortLinks[__('Identifier')] = 'Dublin Core,Identifier';
?>
<div id="sort-links">
    <span class="sort-label"><?php echo __('Sort by: '); ?></span><?php echo browse_sort_links($sortLinks); ?>
</div>

Great, I’ll try that.
Any advice for the back-end view?

This topic was automatically closed after 250 days. New replies are no longer allowed.