Note that there are some explanatory texts on larger screens.

plurals
  1. POViewing articles that are associated with taxonomy term A (AND) term B in Drupal 6
    primarykey
    data
    text
    <h1>Summary:</h1> <p>I'm currently working on customizing Drupal-6 as a news portal. </p> <p>In summary, I'm trying to view posts that belong to term 5 AND term 1.</p> <p>The drupal documentation mentions that this can be achieved through the below taxonomy URL by separating the term ids with a comma (,):</p> <p><strong><a href="http://drupal-server/taxonomy/term/5,1" rel="nofollow noreferrer">http://drupal-server/taxonomy/term/5,1</a></strong></p> <p><em>(See. Using Vocabularies for Navigation: <a href="http://drupal.org/node/22273" rel="nofollow noreferrer">http://drupal.org/node/22273</a>)</em></p> <p>The above is not working as expected and is showing content with "term 5 OR term 1" instead of "term 5 AND term 1".</p> <p>Any ideas on how to fix this?</p> <h1>Problem Details:</h1> <p>I have defined two vocabularies:</p> <ol> <li><p><strong>"Content"</strong> vocabulary which has the terms:</p> <p>a. <strong>Events</strong></p> <p>b. <strong>News</strong></p> <p>c. <strong>Lectures</strong></p></li> <li><p><strong>"Academy"</strong> vocabulary:</p> <p>a. <strong>University A</strong></p> <p>b. <strong>University B</strong></p> <p>c. <strong>University C</strong></p></li> </ol> <p>Every time an article is posted, it is assigned a term indicating which university does it relate to, and whether it is an Event, News or Lecture.</p> <p>I'm trying to display the posts that are of type "Lecture" AND "University A".</p> <p>According to the Drupal documentation, this can be achieved using the URL:</p> <p><strong>/taxonomy/term/5,1</strong></p> <p>Assuming "University A" got assigned the term ID 5 and the "Lecture" got assigned term id 1. The documentation mentions that the comma separator (,) works as an AND operator and thus displaying only posts that relate to term 5 'and' term 1.</p> <p>Unfortunately, this is not working as expected, it is showing me the posts that relate to term 5 OR posts that relate to term 1.</p> <p>Is this a Drupal bug? Any ideas on how to force an AND? I've even tried replacing the comma with the "+" operator but with no luck (ie. /taxonomy/term/5+1).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload