Re: Problem rendering Structures_DataGrid with Smarty

From: Date: Mon, 26 Jun 2006 16:27:23 +0000
Subject: Re: Problem rendering Structures_DataGrid with Smarty
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24468@lists.php.net to get a copy of this message
Hi Andrew, Andrew Teixeira wrote:
I have been happily using SDG (0.6.3) for a while now in conjunction with Smarty. Everything was going fine until I decided to upgrade to the new 0.7.1 system. I downloaded 0.7.1 with all its requisite DataSource and Renderer packages. I then tried to convert from the 0.6.3 way of doing things to 0.7.1's somewhat different process.
Yes the Smarty driver has much changed. I understand you're confused.
$renderer =& $dataGrid->getRenderer(); $renderer->setContainer($this->_template); $dataGrid->fill($this->_template); $template =& $renderer->getContainer(); $html = $template->fetch(TEMPLATE_DIR . 'template.tpl');
Just do : $smarty = new Smarty; $datagrid->fill($smarty); $smarty->display(TEMPLATE_DIR . 'template.tpl'); The smarty variables and function are explained at the top of Structures/DataGrid/Renderer/Smarty.php Regards, -- Olivier

« previous php.pear.general (#24468) next »