Passing in arguments from the URL

Sometimes, instead of your context coming from data within the panel, you'll specifically want to pass in arguments via your URL. So for example if I want to pass in a specific date to my page (or calendar), I could put http://www.mydomain.com/path/to/page/2011-12-01 (where the last argument is my date).

In order to have this date passed into my panel as a context, I need to specifically tell the panel that I have an argument coming in and that it should be a context. This is done in Settings > Basic (on a normal panel page. I'm not sure if this is possible for templates).

Here you will find a path to enter

You enter your 'arguments' as a name prepended by % or ! - if you want the date to be required in the URL you us %datecontext. If it is not required, then use !datecontext.

Once you've saved this pane, then you can step over to the 'Arguments' pane where you can tell Panels which context to assign this argument to. Click Change to select the assigned context.

You will get a list of available contexts, which you can select. Each context may or may not have a settings form which you can also complete with further related information. (See below for programming your own context arguments).