1

I have two taxonomies, Menu and Menu Category. Menu has a term reference to Menu Category, allowing multiple selections.

I have a view that displays a Menu, and in this view I'm displaying the related Menu Categories - in the Multiple Field Settings for Menu Categories, I have the "Display all values in the same row" option unchecked.

The Menu Categories are sorted by weight, but in the view they are not being output in this order (I can't honestly say what order they are appearing in, perhaps by the order they were added as term references, but certainly not alphabetically or by id).

I've added a Menu Category to the sort criteria, but that doesn't have the desired effect (presumably because it's not looking within the Menu Categories).

I also tried adding a relationship to Menu Category from this view, but this doesn't seem to work either - although there are 3 options and I'm not sure which (if any) are correct:

  • Taxonomy term: Content using Menu Category

    Relate each Content with a Menu Category set to the term.

  • Taxonomy term: Menu Category (field_menu_categories)

    Appears in: taxonomy_term:menu.

  • Taxonomy term: Taxonomy term using Menu Categoies

    Relate each Taxonomy term with a Menu Categories set to the term.

Update: As requested, to clarify my view output, I'm expecting the Menu details including the list of Menu Categories, with this taxonomy sorted by the weight assigned to it.

  • Could you elaborate how should your views result look like? – Елин Й. Jul 22 '15 at 11:27
  • I've added clarification – user34185 Jul 23 '15 at 8:23
1

On further looking at this issue, I decided to approach it from a different angle. Without any modifications to my view, which has no sort order defined, I installed and enabled the Taxonomy Term Reference module (https://www.drupal.org/project/term_reference_sortable).

Using the above module and setting my Menu Categories term reference to use this widget, I found the order I selected is reflected in my view.

Your Answer

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