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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | panels-3x-relationship-574048-3.patch | 4.34 KB | noahlively |
| #1 | terms_from_field.inc_.txt | 2.62 KB | markus_petrux |
Comments
Comment #1
markus_petrux commentedHere'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: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.
Comment #2
bennash commentedHmm, I tried this, but get errors. Anybody else?
Comment #3
noahlively commentedWorks for me.
I've rolled a patch using the exact code listed attached above in #1. Rolled the patch against the latest in the 6.x-1.x branch.