Hello,

I am wondering from a structural / design / performance standpoint, is it a good idea to build a ctools context based on a query string parameter?

Example:
http://mysite.com/path/to/panel?stream_name=xyz.

I am thinking of building a context to pick up "stream_name" so that I can pass it to a content pane in one of my panels.

Thoughts?

Thanks in advance.
Noah Lively

Comments

aaronbauman’s picture

I would be interested in this.
For my purposes, i need to pass an argument from the Drupal path through a panel and set it as the src attribute on an iframe.
Without the full query string, the iframe src attribute will be wrong.

It would be nice if the "String" argument offerend an additional option to capture the query string as well.
I'll see if i can work out a patch for this.

aaronbauman’s picture

Title: Using query strings for custom context plugins » Additional configuration option for String arguments to pass URL query string to contexts
Category: support » feature
StatusFileSize
new1.58 KB

Here's a patch to do this.

It's quite straightforward to put this right into ctools, but maybe merlin will say that this should be contrib.
Anyway, this at least serves for proof of concept.

aaronbauman’s picture

Status: Active » Needs review
nagiek’s picture