Panels 3 integration for Content Taxonomy
markus_petrux - September 10, 2009 - 19:15
| Project: | Content Taxonomy |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
Working with panels 3, I was in need to render a view that wanted a content taxonomy field as an argument, so I've written a Panels 3 Relationship for Content Taxonomy that can be used to provide "Terms from field" context, and this can be used in Panels to pass them as arguments to the view.
It would be nice if this Panels 3 relationship was included in Content Taxonomy. I'll attach the code in a minute.

#1
Here's the code. To include in Content Taxonomy, proceed as follows:
1) Create the directory
includes/panels/relationshipsinside the content_taxonomy module directory.2) Copy to the new subdirectory the attached file
terms_from_field.inc3) Edit
content_taxonomy.moduleand append the following code:<?php/**
* Implementation of hook_ctools_plugin_directory().
*/
function content_taxonomy_ctools_plugin_directory($module, $plugin) {
if ($module == 'ctools' && $plugin == 'relationships') {
return 'includes/panels/' . $plugin;
}
}
?>
That's it.
PS: Sorry, no tools at hand at this moment to provide a proper patch. Please, let me know if you would prefer a patch.
#2
Hmm, I tried this, but get errors. Anybody else?