Index: trunk/core/kernel/parser/tags.php =================================================================== diff -u -N -r8472 -r8605 --- trunk/core/kernel/parser/tags.php (.../tags.php) (revision 8472) +++ trunk/core/kernel/parser/tags.php (.../tags.php) (revision 8605) @@ -197,12 +197,23 @@ */ function Process() { + $short_closing = false; + if (isset($this->NP['_short_closing_'])) { + unset($this->NP['_short_closing_']); + $this->TagData = str_replace(' _short_closing_="1"', '', $this->TagData); + $short_closing = true; + } if ($this->Processor == 'm' || $this->Processor == 'm_TagProcessor') { //if we are procssing Main tags - if ($this->Tag == 'block' || $this->Tag == 'DefineElement') { + if ($this->Tag == 'block' || $this->Tag == 'DefineElement' || ($this->Tag == 'RenderElement' && $short_closing)) { $tag =& new BlockTag('', $this->Parser); $tag->CopyFrom($this); $tag->Process(); } + elseif($this->Tag == 'Capture') { + $tag =& new CaptureTag('', $this->Parser); + $tag->CopyFrom($this); + $tag->Process(); + } elseif ($this->Parser->SkipMode == skip_tags) { return; } @@ -314,14 +325,20 @@ if ($echo) $code[] = '$o = '."'';\n"; - switch ( $this->Tag ) { - case 'DefaultParam': + switch ( strtolower($this->Tag) ) { + case 'defaultparam': foreach ($this->NP as $key => $val) { $code[] = 'if (!isset($'.$key.')) $application->Parser->SetParam(\''.$key.'\', \''.$val.'\');'; $code[] = '$'.$key.' = isset($'.$key.') ? $'.$key.' : \''.$val.'\';'; } return $code; case 'param': + $code[] = 'if (isset($application->LateParsed["'.$this->NP['name'].'"])) {'; + $code[] = '$__f = $application->PreParsedBlocks[\'capture_'.$this->NP['name'].'\'];'; + $code[] = '$application->Parser->SetParam(\''.$this->NP['name'].'\', $__f(array())'.');'; + $code[] = '$'.$this->NP['name'].' = $application->Parser->GetParam(\''.$this->NP['name'].'\');'; + $code[] = '$params[\''.$this->NP['name'].'\'] = $'.$this->NP['name'].';'; + $code[] = '}'; $param_code = '$o .= $params["'.$this->NP['name'].'"]'; if (isset($this->NP['plus'])) { $param_code .= ' + '.$this->NP['plus']; @@ -426,6 +443,7 @@ if (isset($pass_params['result_to_var'])) { $code[] = '$'.$pass_params['result_to_var'].' = $application->Parser->GetParam(\''.$pass_params['result_to_var'].'\');'; + $code[] = '$params[\''.$pass_params['result_to_var'].'\'] = $'.$pass_params['result_to_var'].';'; $echo = false; }