Re: [SMARTY] object question
| From: | messju mohr | Date: | Thu, 13 Mar 2003 12:54:24 +0000 |
| Subject: | Re: [SMARTY] object question | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8612@lists.php.net to get a copy of this message | ||
hello,
On Thu, Mar 13, 2003 at 07:37:38AM -0500, lists@yewlands.com wrote:
> 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?
i think this is an issue with Smarty-2.4.2 . it works fine under
2.5.0-RC1 . you may give it a try. i think it is more stable than the
version-name suggests :)
> cheers
>
> Matt