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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amateescu’s picture

I'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 ?

jonhattan’s picture

They'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 :)

jonhattan’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
FileSize
3.2 KB

This is almost the same patch for 7.x

dajjen’s picture

Fixed a bug with previous patch that didn't render settings form in panels.

dajjen’s picture

removed whitespace from patch on comment #4