Re: Smarty With Pear Datagrid
| From: | arnaud sellenet bodin | Date: | Sat, 10 Jun 2006 10:03:03 +0000 |
| Subject: | Re: Smarty With Pear Datagrid | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24314@lists.php.net to get a copy of this message | ||
Hi !
The problem is the Structures_DataGrid_Renderer_Smarty needs to create an occurence of smarty, so tries to include it. Depending on the YDFramework file structure, you could try to add the YDF Smarty folder to the PHP include_path instead of installing it in your pear folder. Not sure it will work, but then but YDF and Structures_DataGrid_Renderer_Smarty will include_once the same file.
Otherwise, I suggest you check the CVS repository of SDG as there are many changes since the last release maybe there's a better way to achieve this in it.
Le 10 juin 06 à 09:13, moses@softwaysolutions.com a écrit :
HiI am using YDFramework in my applications which uses Smarty as its Template Engine.I have Started Learning Pear Datagrid and I tried to use it in my application.but have some problems.If any one can help I will be PleasedSince I am using smarty I prefer the following code to create an datagrid object.$datagrid =& new Structures_DataGrid (10,null ,DATAGRID_RENDER_SMARTY);which gives the following errorFailed opening required 'Smarty/Smarty.class.php'I could understood why this error occours because YDFramework is coupled with smarty I dont have any seperate folder for smarty so It could not locate the path. Now I downloaded Smarty and place it in my application folder. again I get the Following Error Fatal error: Cannot redeclare class smarty in D:\web\Moses\test\pear\DataGrid\Smarty\Smarty.class.php on line 65Since YDFramework is coupled with smarty it already initialize the Class Smarty so the class can be redeclared.Now what to do.AgainI tried with working with creating the instance of datagrid without passing the parameter DATAGRID_RENDER_SMARTY$datagrid =& new Structures_DataGrid (10);Now I dont get any error and I am passing the Datagrid object to the smarty template and its working Fine.I want to clarify some doubts...1) Is there any particular reason or use to Pass the argument DATAGRID_RENDER_SMARTY while using Smarty. 2) Though I am not using the argument its is working. Why!!!!regards moses --PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php