0

We have customer who insists that there is a setting/method that will order the listing-page for taxonomy attributed event-type by date ascending. My exploration has lead me to the .../admin/config/search/path/patterns settings in Taxonomy term paths. We are using the default: [term:vocabulary]/[term:name].

However I can not find a setting that will allow for date-ordering. Is there such a setting? The behavior of the site is that the ordering is done by the initial-post date.

I've advised that this can be done w/ View.

9
  • 1
    the event date field must be in the view's "Sort criteria" (most likely being the first) and it would be set there. If you need help with this. we need more info and the view being used to produce the event listings page. Sep 17, 2018 at 17:20
  • The page I'm referring to is not a VIEW it is -- I believe -- a natively produced page by the taxonomy system.
    – Mike
    Sep 18, 2018 at 12:27
  • Just to confirm this site is in what version of Drupal? Sep 18, 2018 at 13:06
  • The site is Drupa 7
    – Mike
    Sep 18, 2018 at 17:52
  • 1
    If the event listing-page is managed by the default Taxonomy function, there is no UI setting. But if the event listing-page is managed by the Views module (ether its default view for taxonomy or a customized version) then you have the Views UI to be able to adjust the "Sort criteria". Last if there is something else managing the event listing-page we do not have enough information to help just yet. Sep 19, 2018 at 14:20

1 Answer 1

0

/admin/config/search/path/patterns is an admin page for the module Pathauto, URL alias - Patterns. And the default pattern for Taxonomy terms just happens to be [term:vocabulary]/[term:name].

enter image description here

You can also see that each "vocabulary" of taxonomy terms can have it's own pattern.

To confirm if Views is handling the display of any of the taxonomy terms pages we need to find a view that takes over the default Taxonomy term path and is already enabled. Meaning, the modules View and Views UI must be enabled. If only Views is enabled, enabling Vies UI at this point makes this easier, plus we will need it later to change the "Sort criteria". With install of the of the Views module the Taxonomy term view is created. This view has a path of 'taxonomy/term/%' the same as the Taxonomy modules default path and when the view is enabled it overrides the Taxonomy module's handling of the display of the taxonomy terms pages.

enter image description here

For a final conformation that this taxonomy vocabulary's term pages are being handled by views lets look at the final HTML that is out generated.

enter image description here

For a views generated page you will see a few key classes in the content's wrapping elements (unless heavenly custom themed).

<div class="content">
  <div class="view view-taxonomy-term view-id-taxonomy_term view-display-id-page view-dom-id-36a8...">
    <div class="view-content"> 

vs the generated page you will see from the taxonomy module.

<div class="content">
  <div class="term-listing-heading"><div id="taxonomy-term-1" class="taxonomy-term vocabulary-tags">
    <div class="content">

Bonus tip: The classes added by the view let us know the machine names of the view being used. view-id-taxonomy_term tell you the "taxonomy_term" view is using used, while view-display-id-page tell you it is the "page" display in current view.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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