Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi there,
attached patch contains an «access» plugin for ctools. The access plugin is used for example in "selection rules" in page_manager variants and also in the visibility rules in panel regions.
What the plugin does is simply check if a context node is in any of the configured queues. An example usage for simple mortals as me: override «node template» page and set a selection rule for nodes in a given nodequeue, similar to the «node type» selection rule.
Comment | File | Size | Author |
---|---|---|---|
#5 | nodequeue-ctools-access-plugin-5.patch | 3.22 KB | dajjen |
#4 | nodequeue-ctools-access-plugin-4.patch | 3.22 KB | dajjen |
#3 | nodequeue-ctools-access-plugin.patch | 3.2 KB | jonhattan |
nodequeue-ctools-access-plugin.patch | 3.19 KB | jonhattan | |
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedI'm not so familiar with ctools plugins or panels (read: unfortunately, haven't had the chance to use them yet), but is this related in any way to #559252: Panels context integration ?
Comment #2
jonhattanThey're not related. #559252: Panels context integration provides a nodequeue context (do not confuse with context module): a context for panels is some data that is available to the panel. In the case of nodequeue it is some-data-obtained-from-a-queue (first,last or random node) that can be used in the panel.
OTOH my patch provides an access plugin that is used as a «selection rule» to activate a panel variant when the node being viewed is part of a given nodequeue. Same thing (an access plugin) is also is used for «visibility settings» of single panes within a panel.
I did learn almost all of this yesterday so I may be wrong at some point :)
Comment #3
jonhattanThis is almost the same patch for 7.x
Comment #4
dajjenFixed a bug with previous patch that didn't render settings form in panels.
Comment #5
dajjenremoved whitespace from patch on comment #4