0

I have a vocabulary that list schools that users can select on registration and other vocabularies for books and courses, used on nodes.

Under each school's term page I would like to display a list of terms from Book vocabulary and other vocabularies and clicking on the any of the terms will list nodes with the term.

CT>Ucon

  • Books
    • textbooks
    • fiction
    • animes

I have thought of using panel to display school terms and then place a block of the book terms in a region in the panel, but I'm not sure how to go about it especially the URL. I would like the url to look like uconn/books/texbooks.

Additional info: Craigslist has similar nested categories. You have city category then under each city you have sale, services, community sections. This is what I'm trying to achieve. I want each school to have their own sub-categories listed under them.

0

Dee, I completely did not understand your question. But these code might help you.

/*To load a vocabulary*/

 $vocabulary = taxonomy_vocabulary_machine_name_load($machine_name);
 Example::$vocabulary = taxonomy_vocabulary_machine_name_load('book');

/*To get array of all term objects as a tree*/

$terms = taxonomy_get_tree($vocabulary);

/*To get children of all terms*/


foreach($term as $aterm) {

  $child = taxonomy_get_children($aterm);

}

Your Answer

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

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