I've been digging through the code for hours, and before that, in the admin interface.
I can't figure out how to pass more than just the 'first' term to the page as context. (the path is node/%node)
I want to use the terms to control which widgets show up in the side-panes so that the author of a node can control which widgets will show up with his node.
However, only one shows up since only the first term is passed.
I was hoping you could help me understand what types of plugins I need to write in order to pass "terms from node" as a context and have the access plugin still operate correctly.
If I can get it running, I'll submit it back as something that can be added. I'm just a little confused as to everything that's involved. Do I just need to write a context plugin, or also an access plugin? Are there any other plugins involved in modifying visibility settings on the content panes in the regions?
Also, huge thanks to merlinofchaos for designing this module. It's pretty powerful, and I've been enjoying learning how to use it.
Any help would be greatly appreciated! Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | ctools plugins.zip | 2.74 KB | msumme |
Comments
Comment #1
msumme commentedactually, i figured out how to do this... i modified a few existing plugins (by duplicating them) and so now it has a very flexible architecture, where it basically says "AND" for multiple terms. So if someone selects an access rule that requires the node to be tagged with two terms, it won't show up with one or the other.
This, or a refined version of it, might be added to ctools?
Also, if the node is multiple tagged, but the rule only requires one, then it will still show up.
Which is excellent for making configurable widgets. This could be used on a user profile page made with content profile to determine which widgets will show up on their page by letting the user select them from a "widgets" vocabulary...
I attached the two files I needed to create, which were an access plugin and a relationship plugin
They're pretty much the same as the term access and relationship plugins except that they aren't limited to the "first".
I was wondering if using the 'tid' instead of the term name could solve the multiple vocabularies problem also? Where sometimes you want something called 'apple' from "Fruits" and NOT 'apple' from "Projectiles"?
Comment #2
crea commentedVery nice! I especially liked your widgets idea.
Comment #3
cmillet1 commentedI would be interested in a solution to this problem that doesn't involve modifying any modules. I think the desired behavior would be that if you wanted to pass in multiple terms from a single vocabulary, you would create multiple relationships of the "Term from node" type, give them unique keywords, and then when you used that relationship in your panel each individual relationship would refer to each successive application of that vocabulary's term. So the user would edit their node, tag it "widget 1, widget 5" and I would have 2 relationships and 2 panes setup to do something for each of those terms.
Comment #4
summit commentedHi,
I think I did this just by using views/panels and ctools.
In views you need to make a display with the right arguments, say %1 and %2
In ctools you can then use %1 and %2 as arguments (for example for the pagetitle).
May be I am completely mistaken and didn't got your usecase good.
Greetings, Martijn
Comment #5
merlinofchaos commentedUnfortunately, these kinds of submissions really need to be in patch form to be reviewable. Can you please provide a patch?
(Also this is probably actually meant to be against CTools).
Comment #6
msumme commentedI don't have patching software readily available on my current machine, if someone who does has a few minutes to do this, the code would just be patched against the plugins listed above. Sorry I don't have more time to do this, but it would take too long to get the resources together.
re: cmillet1
The real problem is that if you wanted to pass in terms and not just a term, for a ctools view property that only requires it to be tagged with one term. If another term is higher up on the list and is tagged, then the panels pane won't show up. So this is a bug, IMO.
Comment #7
Letharion commentedClosing this issue as it's been in "Needs work" for over 6 months. Feel free to re-open if you re-roll the patch.