Servus, folks!
Building a site on 5.5, I have the need to access the taxonomy name for a given node. There's an array in the $node record which reads (with contemplate):
$node->taxonomy(array)
$node->taxonomy[17] (object)
$node->taxonomy[17]->tid
17
...
$node->taxonomy[17]->name
The Term I Need
This seemed nice to me, as there's the name I have to submit to a view right at hand. Or at least it seems so, because I can't find a way to retrieve that index (17 here) from node...
It would be nice to know if there's a way to get something like this to happen:
print $node->taxonomy[ $node->taxonomy_array_index_id ]->name
telling me
The Term I Need
Just in case you're curious: the node in question holds the data for some artist, and the discography is to be generated using the artist's name as an argument for a view. The artist and the disc records are CCK nodes linked with a common category where all the artists in that system are listed. So the user can enter either an artist or a disc / critic, linking both records through that common taxonomy-term.
Using a noderef field wasn't an option because of other criteria. As contemplate lists that taxonomy[index]->name nicely, I wonder where it gets that index from?
Any takers?
TIA,