| Olivier Guilyardi 2006-06-26, 7:01 pm |
| 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 .
>
> $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
|