Plugin to exclude initial articles from sort?

23 views
Skip to first unread message

Anneliese Dehner

unread,
Dec 16, 2016, 4:01:44 PM12/16/16
to Omeka Dev
Hi all,

I'm wondering if anyone has created a plugin to exclude initial articles from Dublin Core Title sorting in Omeka 2.x. Or if anyone is aware of an existing plugin that could be modified to do this. 

Thanks,
Anneliese

Patrick Murray-John

unread,
Jan 1, 2017, 11:58:24 AM1/1/17
to omek...@googlegroups.com
Anneliese,

Could you say more about what you mean by 'initial articles'? Are these just the most recent items, or are they items that have gone through some kind of review process?

Patrick
--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
To post to this group, send email to omek...@googlegroups.com.
Visit this group at https://groups.google.com/group/omeka-dev.
For more options, visit https://groups.google.com/d/optout.


Walter Rice

unread,
Jan 1, 2017, 6:48:16 PM1/1/17
to omek...@googlegroups.com
I'm sure this is referring to initial articles like "a", "an", and "the". As well as initial punctuation, like " and ( and [.

Two options that have worked for me in other systems:

* include non sortable text within double brackets, like "[[The]] Best Day". The plugin would strip the [[ and ]] for display purposes, and exclude the enclosed text for sorting purposes. 

* use a separate custom field "Sort Title" that is used in the browse for sorting. This requires a bit of work, as each title must be entered/updated twice. But it could be implemented in the theme with ease, without a plugin. 

Anneliese Dehner

unread,
Jan 1, 2017, 7:14:17 PM1/1/17
to omek...@googlegroups.com
Walter is right, I'm referring to Omeka item titles beginning with "a", "an", "the", etc. 

I would like to exclude these initial articles, when sorting by Dublin Core Title. So titles like A MORAL SUBSTITUTE FOR WAR, JANUARY 9, 1904 would be sorted by "Moral" rather than "A moral". 

It's true that an additional field could be populated with MORAL SUBSTITUTE FOR WAR, JANUARY 9, 1904 (for the above example) for sorting purposes. And I could use javascript to auto-populate the additional field when a DC title is entered. But I would rather improve the system's sort functionality than create additional metadata to accommodate the system's sorting capability.

I bet others would be interested in this functionality, and I wonder if anyone has already written a plugin or code to make it happen.

Thanks!!
Anneliese

On Sun, Jan 1, 2017 at 3:48 PM, Walter Rice <waltr...@gmail.com> wrote:
I'm sure this is referring to initial articles like "a", "an", and "the". As well as initial punctuation, like " and ( and [.

Two options that have worked for me in other systems:

* include non sortable text within double brackets, like "[[The]] Best Day". The plugin would strip the [[ and ]] for display purposes, and exclude the enclosed text for sorting purposes. 

* use a separate custom field "Sort Title" that is used in the browse for sorting. This requires a bit of work, as each title must be entered/updated twice. But it could be implemented in the theme with ease, without a plugin. 
On Sun, Jan 1, 2017 at 11:58 AM -0500, "Patrick Murray-John" <patric...@gmail.com> wrote:

Anneliese,

Could you say more about what you mean by 'initial articles'? Are these just the most recent items, or are they items that have gone through some kind of review process?

Patrick

On 12/16/2016 04:01 PM, Anneliese Dehner wrote:
Hi all,

I'm wondering if anyone has created a plugin to exclude initial articles from Dublin Core Title sorting in Omeka 2.x. Or if anyone is aware of an existing plugin that could be modified to do this. 

Thanks,
Anneliese
--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+unsubscribe@googlegroups.com.

To post to this group, send email to omek...@googlegroups.com.
Visit this group at https://groups.google.com/group/omeka-dev.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+unsubscribe@googlegroups.com.

To post to this group, send email to omek...@googlegroups.com.
Visit this group at https://groups.google.com/group/omeka-dev.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+unsubscribe@googlegroups.com.

Jeremy Boggs

unread,
Jan 2, 2017, 8:11:25 AM1/2/17
to omek...@googlegroups.com
Dont’ think a plugin like this exists, though you could modify this bit of code I wrote to skip over any HTML used at the beginning of the DC:Title.

https://gist.github.com/jeremyboggs/3319ce091a751912101943dc1f73c8c6

I wrote about this a few months ago:

https://groups.google.com/forum/#!topic/omeka-dev/SXBK-ym4QrE

Need to update this, per the comment by luku. luku also suggests a second field that duplicates the title, without the initial articles. Imagine this would be better performance-wise.

If I get some time, I’ll update this gist, and see about including a way to exclude those articles. If anyone else gets to it first, please share. :)

Cheers,
Jeremy

> On Jan 1, 2017, at 7:13 PM, Anneliese Dehner <dehn...@gmail.com> wrote:
>
> Walter is right, I'm referring to Omeka item titles beginning with "a", "an", "the", etc.
>
> I would like to exclude these initial articles, when sorting by Dublin Core Title. So titles like A MORAL SUBSTITUTE FOR WAR, JANUARY 9, 1904 would be sorted by "Moral" rather than "A moral".
>
> It's true that an additional field could be populated with MORAL SUBSTITUTE FOR WAR, JANUARY 9, 1904 (for the above example) for sorting purposes. And I could use javascript to auto-populate the additional field when a DC title is entered. But I would rather improve the system's sort functionality than create additional metadata to accommodate the system's sorting capability.
>
> I bet others would be interested in this functionality, and I wonder if anyone has already written a plugin or code to make it happen.
>
> Thanks!!
> Anneliese
>
> On Sun, Jan 1, 2017 at 3:48 PM, Walter Rice <waltr...@gmail.com> wrote:
> I'm sure this is referring to initial articles like "a", "an", and "the". As well as initial punctuation, like " and ( and [.
>
> Two options that have worked for me in other systems:
>
> * include non sortable text within double brackets, like "[[The]] Best Day". The plugin would strip the [[ and ]] for display purposes, and exclude the enclosed text for sorting purposes.
>
> * use a separate custom field "Sort Title" that is used in the browse for sorting. This requires a bit of work, as each title must be entered/updated twice. But it could be implemented in the theme with ease, without a plugin.
>
>
>
>
>
> On Sun, Jan 1, 2017 at 11:58 AM -0500, "Patrick Murray-John" <patric...@gmail.com> wrote:
>
> Anneliese,
>
> Could you say more about what you mean by 'initial articles'? Are these just the most recent items, or are they items that have gone through some kind of review process?
>
> Patrick
>
> On 12/16/2016 04:01 PM, Anneliese Dehner wrote:
>> Hi all,
>>
>> I'm wondering if anyone has created a plugin to exclude initial articles from Dublin Core Title sorting in Omeka 2.x. Or if anyone is aware of an existing plugin that could be modified to do this.
>>
>> Thanks,
>> Anneliese
>> --
>> You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
>> To post to this group, send email to omek...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/omeka-dev.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
> To post to this group, send email to omek...@googlegroups.com.
> Visit this group at https://groups.google.com/group/omeka-dev.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
> To post to this group, send email to omek...@googlegroups.com.
> Visit this group at https://groups.google.com/group/omeka-dev.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.

Anneliese Dehner

unread,
Jan 2, 2017, 2:08:32 PM1/2/17
to omek...@googlegroups.com
Thanks Jeremy!

Anneliese

>> To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+unsubscribe@googlegroups.com.

>> To post to this group, send email to omek...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/omeka-dev.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+unsubscribe@googlegroups.com.

> To post to this group, send email to omek...@googlegroups.com.
> Visit this group at https://groups.google.com/group/omeka-dev.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+unsubscribe@googlegroups.com.

> To post to this group, send email to omek...@googlegroups.com.
> Visit this group at https://groups.google.com/group/omeka-dev.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+unsubscribe@googlegroups.com.

> To post to this group, send email to omek...@googlegroups.com.
> Visit this group at https://groups.google.com/group/omeka-dev.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages