object question
| From: | lists at yewlands dot com | Date: | Thu, 13 Mar 2003 12:37:38 +0000 |
| Subject: | object question | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8611@lists.php.net to get a copy of this message | ||
I have an object which is referenced by $site. This object has no references in
to smarty in any way.
The object contains an array current which contains all the strings, arrays I'm
trying to get at.
I have assigned the object to smarty using assign_by_ref('site',$site) and also
tried register_object
If I turn debugging on I see the object with all it's other arrays and variables
set including those of current.
I am however having great difficulty using these within a template file.
I have using $site->current.parent_name and $site->current[parent_name] to
access a variable within the current array but I keep getting an unidentified
token error thrown up from smarty whichever one I use. God know what it's going
to be like trying to access arrays within it.
Can I use/access objects in the usual way I would within php scripts?
cheers
Matt
-------------------------------------------------