Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
In the FullCalendar Legend block configuration I can select the type of legend: Taxonomy or Bundle.
I would like my legend only to display specific vocabularies. The events on my calendar have multiple term reference fields (tags, venue, category) and I don't want all of them in the legend.
Vague ideas-
- Not all of my vocabularies have Colors enabled: perhaps it would be a start to exclude the vocabulary from the legend if it doesn't have colours defined.
- Allow selecting one or more vocabularies in the block configuration.
- How about multiple blocks with a different configuration for each one? à la Menu Block
- Or a Views area handler instead of a block? this might be neater: perhaps the configuration could be automatic based on the fields passed to the View. I don't know enough about area handlers yet.
I could do some work on this but not for a few weeks.
Comment | File | Size | Author |
---|---|---|---|
#8 | fullcalendar-select_vocab_after_1880252-1393722-8.patch | 8.35 KB | kristiaanvandeneynde |
#6 | fullcalendar-select_vocab-1393722-6.patch | 8.27 KB | kristiaanvandeneynde |
Comments
Comment #1
tim.plunkettAdded a new component, don't worry, it wasn't there when you filed the issue :)
Blocks are going to stay single-purpose, but once #1373422: Add documentation for FullCalendar Legend is done everyone will realize that Panels is awesome and you can use the custom pane FullCalendar Legend provides to do multiple things.
@pjcdawkins, which would be more useful? Choosing a field to restrict by, or a vocabulary? By field, I mean a taxonomy term reference field, to use its allowed vocabularies setting (we're already using that anyway).
Comment #2
pjcdawkins CreditAttribution: pjcdawkins commentedAh, I hadn't considered the pane!
Choosing a term reference field would make more sense than choosing a vocabulary.
Comment #3
mcpuddin CreditAttribution: mcpuddin commentedAnother way to do this is to use template overrides to hardcode the ones you want to display:
Comment #4
tkbcreative CreditAttribution: tkbcreative commentedFor anyone still having this issue and not wanting to go down the Panels route there is another simple way to solve the Legend issue here at #10 http://drupal.org/node/1416536#comment-6832116
Comment #5
wickwood CreditAttribution: wickwood commentedIf this can be done with Panels, could someone post some explicit instructions, or if they are posted point me to them?
What is posted in #1373422: Add documentation for FullCalendar Legend didn't help me at all solve this problem. That problem being to create a calendar that has cotent that has more than one taxonomy, but only one of those taxonomies should be in the legend.
Thanks for any help in advance!
Steve
Comment #6
kristiaanvandeneyndeIt seems another developer came up with a solution on a project that we recently ordered. He failed to post it to drupal.org however.
It seems to work, so I decided to clean up his patch a bit and post it here. Feel free to try it out and further improve it.
Comment #7
kristiaanvandeneyndeComment #8
kristiaanvandeneyndeAs I personally also needed the patch from #1880252-15: Allow to show/hide events by clicking on the legends, I solved the merge conflict between that issue and this one. Attached is a patch that is basically a reroll, should the other issue get committed first.
If you want to close and commit this issue before that one, you still need to use the patch from #6.
Comment #9
kkasischke CreditAttribution: kkasischke commentedI applied the patch from #1880252-15: Allow to show/hide events by clicking on the legends, and then the patch from this issue, #8. Now, no matter which term I click in the legend, all the events toggle between hidden/shown, instead of just the ones with the appropriate terms. Has anyone else observed this? Not sure where to go from here. Will cross-post this in #1880252: Allow to show/hide events by clicking on the legends