Smarty With Pear Datagrid

From: Date: Sat, 10 Jun 2006 07:13:28 +0000
Subject: Smarty With Pear Datagrid
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24310@lists.php.net to get a copy of this message
Hi I 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 Pleased Since 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 error Failed 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 65 Since YDFramework is coupled with smarty it already initialize the Class Smarty so the class can be redeclared. Now what to do. Again I 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

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