$output=t('<p>You must add some additional fields to this display before using this field. These fields may be marked as <em>Exclude from display</em> if you prefer. Note that due to rendering order, you cannot use fields that come after this field; if you need a field not listed here, rearrange your fields.</p>');
if(!empty($options)){
$output=t('<p>The following substitution patterns are available for this display based on the arguments for this view. Use the pattern shown on the left to display the value indicated on the right.</p>');
foreach(array_keys($options)as$type){
if(!empty($options[$type])){
$output='';
foreach($optionsas$type=>$values){
if(empty($values)){
continue;
}
$vars=array('title'=>$type);
foreach($options[$type]as$key=>$value){
$vars['items'][]=$key.' == '.$value;
foreach($valuesas$key=>$label){
$vars['items'][]=$key.' == '.$label;
}
$output.=theme('item_list',$vars);
}
}
@@ -66,20 +139,26 @@ class views_handler_area_link extends views_handler_area {
$form['help']=array(
'#type'=>'fieldset',
'#title'=>t('Replacement patterns'),
);
$form['help']['help']=array(
'#type'=>'markup',
'#markup'=>$output,
'#description'=>'<p>'.t('The following tokens are available. If you would like to have the characters \'[\' and \']\' please use the html entity codes \'%5B\' or \'%5D\' or they will get replaced with empty space.').'</p>',
'#collapsible'=>TRUE,
'#collapsed'=>TRUE,
'#value'=>$output,
'#dependency'=>array(
$tokenize_id=>array(1),
),
);
}
}
functionoptions_submit(&$form,&$form_state){
parent::options_submit($form,$form_state);
}
functionrender($empty=FALSE){
if(!$empty||!empty($this->options['empty'])){
if($empty&&empty($this->options['empty'])){
return'';
}
$tokens=$this->get_render_tokens();
@@ -94,25 +173,71 @@ class views_handler_area_link extends views_handler_area {
return'';
}
$link_options=array();
// Where we store tokenized values.
$link_properties=array();
// Options that will go into the attributes array for url().