I don't think there is a solution for property sorting book titles etc. in Backdrop Views. In Drupal I was able to use the "Views Natural Sort" module so that I don't get a ton of listings under "A", "An" and "The". But this module isn't available on Backdrop.

Is there another solution for this issue?

Thanks!

Most helpful answers

Thanks for asking this question.  Yes, I love this module as well.  Being a librarian, when I discovered things did not sort correctly it bothered me.  I am using it in Backdrop but have not moved the project to Backdrop Contrib.  

https://github.com/keiserjb/views_natural_sort

I think that is the latest version.  The D7 module has a submodule for sorting any text field.  Views Natural Sort Text Field.  That part does not work but the main module sorting title fields should work.  Give it a try and let me know.

Justin

Comments

Thanks for asking this question.  Yes, I love this module as well.  Being a librarian, when I discovered things did not sort correctly it bothered me.  I am using it in Backdrop but have not moved the project to Backdrop Contrib.  

https://github.com/keiserjb/views_natural_sort

I think that is the latest version.  The D7 module has a submodule for sorting any text field.  Views Natural Sort Text Field.  That part does not work but the main module sorting title fields should work.  Give it a try and let me know.

Justin

Awesome, thank you! I will definitely give it a try and let you know. :)

Hi @keiserjb - I have installed and enabled your module and also entity_plus that is a dependency, but I don't see anywhere to configure Views to use it. My books index is still sorting as before.

Can you please give me some pointers on how to set up? 

Thanks!

ETA: When you install / enable the module, it runs some code in the background to rebuild the info for sort order. Then in your View(s) under Sort Criteria, you select "Sort ascending/descending naturally".

Oh dear! I disabled and enabled the module from within admin/modules and got a ton of error messages as it attempted to rebuild the sort data. Hmm, actually looks like the same error a zillion times:

Notice: Undefined property: File::$name in views_natural_sort_views_natural_sort_queue_rebuild_data() (line 146 of /var/www/html/backdrop1/modules/contrib/views_natural_sort/views_natural_sort.module).

Help? Wait, I will post this over in your Git issue queue.

I just got all those same notices, but when I enabled the natural sort in the view everything was in the correct order.  This is why things are experimental at the moment.

Let me try that then and get back to you.

Okay, so my View already had the natural sort filter that you show in your post. But I removed it and added a new one of the same, and now it works! Weird, but I'll take it. Thanks!

Oops! So I spoke too soon. The "A" part of the alphabetical sorting does work (i.e. "A ..." and "An ..." at the beginning of book titles are not sorted under "A") but "T" still has all the titles that begin with "The."

Woah ... and a bigger problem. I allow the first letter to be passed to the View as a contextual filter, and the books beginning with "A ..." don't show up in the pages under the appropriate letters at all. E.g. "A Boy and His Pony" should be on the "B" page, but it isn't. Although they do show up in the View results if there is no contextual filter.

(This all does work in Drupal.)