function page_manager_redirect_redirect_context_edit_settings in Page manager redirect 6
Same name and namespace in other branches
- 7 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 326 - 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 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. (for example: <em>redirect=1&color=red</em>)'),
);
$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>.'),
);
}