This problem could conceivably be caused by an option not being described well, but it feels bug-ish.

I realized I couldn't use taxonomy_breadcrumb on a taxonomy whose display style was set to 'none (hidden).' I tried the options - I could get the breadcrumb to work properly when I used 'default,' but if I changed it to any other option, dsm() says that $node->taxonomy is an empty array.

I would expect the 'Load into $node object' display option to not render the taxonomy to user view, but still have the data available in $node->taxonomy. That's not the case. So what's the difference between that option and 'none (hidden)'?

It seems like this question has come up before in #266885: Taxonomy is also hidden from Contemplate but I think the question is still valid.

Comments

broon’s picture

I'm having a similar issue with a client. The client set up a vocabulary containing locations of the various offices (i.e. 'Philadelphia', 'Detroit', 'San Francisco'). Now, nodes (projects) are tagged with the respective city where the project leading team is located at. The city tag shall not be seen on the internet (hence using taxonomy_hide) but in turn depending on the city the layout of each node shall be slightly altered (different coloured borders).
Using a template file for the content type ( node-project.tpl.php ) it would be quite easy BUT since the terms from a hidden vocabulary get deleted there's no (simple) way of telling which city the individual project is associated with (w/o making another db query at least).

A simple solution for that is to just copy the whole taxonomy to another variable BEFORE terms get deleted. So, in taxonomy_hide.inc, function _taxonomy_hide_nodeapi() I inserted following code line:

$node->full_taxonomy = $node->taxonomy;

Now, the variable full_taxonomy is available within the template file and contains all taxonomy terms independent from any taxonomy_hide settings.

Regards,
Paul