0

In Views 3 D7, I have a view with an exposed filter pulldown that is based on a taxonomy vocabulary called Versions. The filter pulldown shows the versions in the order of the vocabulary (so 1.0, 2.0, 3.0) and I need it to show them in the reverse order (3.0, 2.0, 1.0).

I have tried using Better Exposed Filters to render the filter, but I haven't seen any option for sorting order. I also tried using the default Drupal filter and again no sorting order.

I tried using the Entity Reference solution in this SE post, but the problem is that I cannot then use autocomplete widget to create new Versions in the node/add form, so I'm locked (I think) into using term reference. Searched around SE and google for quite some time but no solution yet. Any help would be appreciated!

  • Have you tried to set your order in the term list dialog? (admin/structure/taxonomy/yourtermlist). Just drag them where you want them... – Volker Dec 21 '15 at 9:13
  • My issue is that the list is constantly updated with new terms. I can't manually change the order each time. – longboardnode Dec 21 '15 at 12:48
  • In that case you should give ER a go. You don't need to use the autocomplete widget. The standard dropdown list is sufficent. Just create a entitiy reference, type "taxonomy term", select your vocabulary, set to sort by "A property of the base table of the entity" and select "name" and "descending". This should work... – Volker Dec 21 '15 at 13:04
  • Thanks @Volker but how do I add a new term when I add a new Version? Right now I have the taxonomy ref field autocomplete widget adding my new terms automatically, but if I switch to ER, is there a way to still create a new taxonomy term from the node/add form? – longboardnode Dec 21 '15 at 14:09
  • Damn, i misread one of your sentences in the original post. I'll think about it... – Volker Dec 21 '15 at 14:19
0

You should give Entity Reference a go. You don't need to use the autocomplete widget. The standard dropdown list is sufficent. Just create a entitiy reference, type "taxonomy term", select your vocabulary, set to sort by "A property of the base table of the entity" and select "name" and "descending". This should work...

If you need to add new terms on node creation, you could try Entity Connect module. The module will allow you to dynamically create and edit some entity types (e.g. taxonomy terms) which should be referenced into an Entity reference field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.