Index: branches/5.1.x/core/units/configuration/configuration_tag_processor.php =================================================================== diff -u -N -r13569 -r13613 --- branches/5.1.x/core/units/configuration/configuration_tag_processor.php (.../configuration_tag_processor.php) (revision 13569) +++ branches/5.1.x/core/units/configuration/configuration_tag_processor.php (.../configuration_tag_processor.php) (revision 13613) @@ -1,6 +1,6 @@ GoFirst(); $block_params=$this->prepareTagParams($params); -// $block_params['name'] = $this->SelectParam($params, 'render_as,block'); $block_params['pass_params'] = 'true'; $block_params['IdField'] = $list->IDField; $prev_heading = ''; $next_block = $params['full_block']; $this->groupRecords($list->Records, 'Heading'); - $field_values = $this->Application->GetVar($this->getPrefixSpecial(true)); + $field_values = $this->Application->GetVar( $this->getPrefixSpecial(true) ); - while (!$list->EOL()) - { - $this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) ); // for edit/delete links using GET + while (!$list->EOL()) { + $this->Application->SetVar( $this->getPrefixSpecial() . '_id', $list->GetDBField($id_field) ); // for edit/delete links using GET // using 2 blocks for drawing o row in case if current & next record titles match $next_item_prompt = $list->CurrentIndex + 1 < $list->RecordsCount ? $list->Records[$list->CurrentIndex + 1]['Prompt'] : ''; @@ -65,13 +63,31 @@ $next_block = $params['full_block']; } - $block_params['name'] = $curr_block; + $variable_name = $list->GetDBField('VariableName'); + // allows to override value part of block + if ($this->Application->ParserBlockFound('cf_' . $variable_name . '_value')) { + $block_params['value_render_as'] = 'cf_' . $variable_name . '_value'; + } + else { + $block_params['value_render_as'] = $params['value_render_as']; + } + + // allow to completely override whole block + if ($this->Application->ParserBlockFound('cf_' . $variable_name . '_element')) { + $block_params['name'] = 'cf_' . $variable_name . '_element'; + $block_params['original_render_as'] = $curr_block; + } + else { + $block_params['name'] = $curr_block; + $block_params['original_render_as'] = $curr_block; + } + $block_params['show_heading'] = ($prev_heading != $list->GetDBField('Heading') ) ? 1 : 0; // set values from submit if any if ($field_values) { - $list->SetDBField('VariableValue', $field_values[$list->GetID()]['VariableValue']); + $list->SetDBField('VariableValue', $field_values[ $list->GetID() ]['VariableValue']); } $list->SetDBField('DirectOptions', ''); @@ -81,7 +97,8 @@ } $this->Application->RemoveVar('ModuleRootCategory'); - $this->Application->SetVar( $this->getPrefixSpecial().'_id', ''); + $this->Application->SetVar($this->getPrefixSpecial() . '_id', ''); + return $o; }