I'd like to add some content to each vocabulary page. can i do something to create unique vocabindex pages based on the vocabulary index being shown? Cheers, Kevin
I'd like to add some content to each vocabulary page. can i do something to create unique vocabindex pages based on the vocabulary index being shown? Cheers, Kevin
Comments
Comment #1
xanoCurrently it's not possible to have multiple vocabindex_page.tpl.php files, but you can add content per vocabulary by using an if statement that checks if $parent is a vocabulary object and uses the VID to add the right data to the page.
Does this answer your question?
Comment #2
pyxio commentedit sounds like a perfect solution except that I'm not a php programmer ;o) can you provide a sample statement with two VID's? If not, I certainly understand and will use your advice to find a programmer who can write that for me. Many thanks and great module. Cheers, Kevin
Comment #3
xanoVoilà:
The if statement checks if the parent is not a term (you can't for VID, since terms and vocabularies have that property). Then it checks the if the VID matches certain values (3, 867 and 45) and in this case echoes a string. You could also replace the echo statement with a function call or any other PHP code.
Good luck!
Comment #4
pyxio commentedwow. you rock. i will give it a shot tomorrow! a zillion thanks. K
Comment #5
pyxio commentedworked like a charm. Thanks!!
Comment #6
xanoGood to hear that :)
Comment #8
xano