[TYPO3-Solr] Using tx_solr_viewhelper_AbstractSubpartViewHelper

Heiko Kromm | Paints h.kromm at paints.de
Fri Oct 28 10:27:51 CEST 2011


Hi Ingo, 

this is my execute method: 
public function execute(array $arguments = array()) { 
$template = clone $this->template; 
t3lib_div::devLog('template Content','solr',1,array($this->template->getTemplateContent())); 
t3lib_div::devLog('template Content Cloned','solr',1,array($template->getTemplateContent())); 
$template->addVariable('mytest', 'Testvariable'); 
return $template->render(); 
} 

As you can see I checked the template content for the template and the cloned template. 
While $this->template has template content, the cloned template has no template content. It's completely empty. 

Regards 
Heiko 




Von: "Ingo Renner" <ingo at typo3.org> 
An: typo3-project-solr at lists.typo3.org 
Gesendet: Donnerstag, 27. Oktober 2011 12:50:27 
Betreff: Re: [TYPO3-Solr] Using tx_solr_viewhelper_AbstractSubpartViewHelper 

Am 26.10.11 19:08, schrieb Heiko Kromm | Paints: 



> could you tell me how I have to assign the variables? 
> I did it this way: 
> Added variable: 
> $template->addVariable('mytest', 'Show Test'); 
> 
> Tried to output it in the template 
> ###MYTEST### 

that should work. Maybe you can post the code or the extension? 



Ingo 


-- 
Ingo Renner 
TYPO3 Core Developer, Release Manager TYPO3 4.2, Admin Google Summer of Code 

TYPO3 - Open Source Enterprise Content Management System 
http://typo3.org 

Apache Solr for TYPO3 - 
Open Source Enterprise Search meets Open Source Enterprise CMS 
http://www.typo3-solr.com 
_______________________________________________ 
TYPO3-project-solr mailing list 
TYPO3-project-solr at lists.typo3.org 
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr 


More information about the TYPO3-project-solr mailing list