0

Maybe the title is not appropriate, so please dont hesitate to change it or give suggestions for it.

Here's how our Drupal site is done:

A vocabulary called "PAA". With this vocabulary there are many terms organized like this:

PAA
  |
  \-- MainTerm01
  |   |
  |   \-- SubTerm01
  |   |
  |   \-- SubTerm02
  |   |
  |   ...
  |   
  \-- MainTerm02
      |
      \-- SubTerm03
      |
      \-- SubTerm04
      |
      ...

Then we have tons of articles that are associated with only one MainTermXX and only one SubTermXX (whatever XX is). Here's what we'd like to do: make a page where we can search for a term (either MainTermXX or SubTermXX) and display all articles that are associated with the term.

My question is: is there a way to do this easily (= is this native in Drupal, just configuration) or will I have some work to do about this?

1 Answer 1

4

You can use Views for building the output of the page and filtering according to the search query (that is called "exposed filter" in views).

To get familiar with Views and see all what you can do with them, check out Nodeone library of videos on Vimeo.

3
  • So what I'm asking for should be easy to do, it's just about configuring Drupal properly? Commented Dec 7, 2012 at 9:59
  • Yes. This does not require you to write any code. The only thing you have to do is to install Views and learn how to use them. Commented Dec 7, 2012 at 14:10
  • 1
    Thank you for your answer. I've created a view that works but the resulting query is 18 lines long with 3 joins, whereas the module I've developped with a hook_node has a query of one line with one join. Well Drupal is powerful for beginners but far more powerful for developpers ;) Commented Dec 21, 2012 at 15:11

Your Answer

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

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