function page_manager_redirect_redirect_context_edit_settings in Page manager redirect 7
Same name and namespace in other branches
- 6 plugins/task_handlers/redirect_context.inc \page_manager_redirect_redirect_context_edit_settings()
General settings for the panel
1 string reference to 'page_manager_redirect_redirect_context_edit_settings'
- redirect_context.inc in plugins/
task_handlers/ redirect_context.inc - This is the task handler plugin to handle page redirecting based on context.
File
- plugins/
task_handlers/ redirect_context.inc, line 335 - This is the task handler plugin to handle page redirecting based on context.
Code
function page_manager_redirect_redirect_context_edit_settings($form, &$form_state) {
$conf = $form_state['handler']->conf;
$form['conf']['title'] = array(
'#type' => 'textfield',
'#default_value' => $conf['title'],
'#title' => t('Administrative title'),
'#description' => t('Administrative title of this variant.'),
);
$form['conf']['contexts'] = array(
'#type' => 'markup',
'#value' => '<p>You may use context keywords in the fields below. Refer to the Contexts tab for details of these. <br />You may surround keywords with spaces to delimit them. For example: <em>filters=tid:<strong> %term:tid </strong>type:news</em>.</p>',
);
$form['conf']['path'] = array(
'#type' => 'textfield',
'#default_value' => $conf['path'],
'#title' => t('URL path to redirect to'),
'#description' => t('A Drupal path (for example: <em>node/12</em>, <em><front></em>) or a full URL that the user will be redirected to if this variant is selected. Include the protocol (e.g. <em>http://</em>) for full URLs.'),
);
$form['conf']['query'] = array(
'#type' => 'textfield',
'#default_value' => $conf['query'],
'#title' => t('Query string'),
'#description' => t('A query string component for the redirection, if any, without any URL-encoding. (for example: <em>redirect=1&color=red</em>)<br />This will be validated, so the actual query string used may not reflect exactly what is entered here if it is invalid. See the <a href="summary">summary</a> or <a href="preview">preview</a> tabs to see what will actually be used. For example, parameters must all follow the form key=value (any without the equals sign will be changed to value=value), and each of these key/value pairs must be separated with a &. Use | in place of any & characters that are intended as part of a key or value.'),
);
$form['conf']['fragment'] = array(
'#type' => 'textfield',
'#default_value' => $conf['fragment'],
'#title' => t('Anchor name'),
'#description' => t('A destination fragment identifier for the redirection. This may mark a place on a page to skip to (for example: <em>#section3</em>). You may include or omit the <em>#</em>.'),
);
return $form;
}