By mokargas on
Is it possible to do the following
a) Get all taxonomy terms
b) Select a single term
c) Select all nodes belonging to this term and list them as a unordered list
repeat for the next taxonomy term and so on?
Is it possible to do the following
a) Get all taxonomy terms
b) Select a single term
c) Select all nodes belonging to this term and list them as a unordered list
repeat for the next taxonomy term and so on?
Comments
I'm pretty sure I know what
I'm pretty sure I know what you want and the answer is no. I like to think of it as the elephant in the room that is Drupal.
-zach
--
harkey design
: z
There's no way to get a list
There's no way to get a list of nodes by taxonomy term?
Here is just some pointers
Here is just some pointers to PHP functions that might do the job for you.
If you do not know the vocabulary id you would first get all the vocabularies and their id's with this function:
or if you know the vocabulary id you would get the vocabulary with this function:
or if you want the whole tree:
Fetch the term object for that term id:
Here is a full example (without any formating of the output) of how it could be done:
Cheers!
I just wanted to mention that the SQL code in your full example helped me bring back nodes-in-a-term for theming my taxonomy_context site. Thanks loads!
++Andy
Use views
Try using the Views module. You can create a block or page with the list of nodes (or a table) filtered using various criteria. For your needs a page with a couple of views blocks would be fine :)
--
Pielgrzym
I ended up doing this, tho
I ended up doing this, tho every time I need to add a taxonomy term (a new category) I need to add another block :/
But, works good !