first some background. i am currently passing in a node with the nid as an argument. i also have a relationship term from node setup. when adding a new pane i do not see the ability to display the 'terms from node' under term context, only lists 'related terms' and 'term description'. is there something missing? i have seen other requests for the same thing. i have created a view/views pane with context and embed it and this works but not ideal.

for the question in the title. i would like to write a snippet that pulls some info related to the term from the db ( a view displays too much and not what i want, like a count) but i am not able to find how to reference the term. i can get the argument passed using arg(0), is there something similar for terms that have relationship to the node as set in context?

Comments

sdboyer’s picture

Status: Active » Fixed

For the type of situation you're describing, my recommendations pretty much boil down this way:

1. If you're planning on reusing this pane in multiple locations across your site, you should really consider writing a panels custom content type plugin. See http://doxy.samboyer.org/panels2 for that.

2. If you just need to do this for a one-time thing, you can use the 'Custom PHP Content' pane. It has some explanatory text built-in to it, but basically, the data that you want will be available in that scope in $context->data->taxonomy; $context->data is a normal node object.

fluxline’s picture

thanks for the quick reply and all the work you are doing on this mod, it's great. one question please, can i assume that it needs to be placed in the 'custom PHP content'? i think i read that 'new custom content' has no context except for the argument passed the panel so will not work.

sdboyer’s picture

Yep, that's the one you want.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.