I've searched for hours both in the code and d.o, but can't find an answer.

Using a page manager page with the following path: /my-page/%custom_arg1/!custom_arg2

Is it possible to access the context created by %custom_arg1 from my argument plugin which handles !custom_arg2?

Said another way, can I create an argument plugin which depends on the first argument value?

Don't know if my use case is clear.

Below one way I've tried from my argument plugin (custom_arg2) but with no luck:

$argument = ctools_get_argument('custom_arg1');
$ctx = ctools_context_get_context_from_argument($argument, arg(1));
// $ctx is NULL at this point...

Thanks,
Jérémy

Comments

merlinofchaos’s picture

Status: Active » Fixed

With an argument plugin, no, they can have one and only one value.

You can, however, use a relationship plugin and it can pull from multiple contexts. Then, you make the argument be a simple string context and pass the string and wahtever the first context was into the relationship, and get the context you need.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Fix typos