 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
cnobes Smarty n00b
Joined: 26 Jul 2012 Posts: 2
|
Posted: Thu Jul 26, 2012 6:34 pm Post subject: Accessing associative array config values by index |
|
|
As I understand the documentation and as of Smarty 2, this worked
| Code: | | $smarty.config.associate_status[$slot.adminAssociateStatus] |
But upon upgrading to Smarty 3 all the above displays is Array.
The above code in the compiled template looks like this.
| Code: | | <?php echo $_smarty_tpl->getConfigVariable('associate_status');?> |
Obviously ignoring the index part.
Ive tried numerous different ways to represent this including using all periods as separators but it keeps continuing to come back the same way. I verified the index has the correct integer in it, but its failing to be passed to the array. |
|
| Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 4199 Location: Hamburg / Germany
|
Posted: Thu Jul 26, 2012 8:15 pm Post subject: |
|
|
| This is a bug. I will fix it ASAP. |
|
| Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 4199 Location: Hamburg / Germany
|
Posted: Sat Jul 28, 2012 8:11 am Post subject: |
|
|
| This bug is now fixed in the SVN trunk and will later be included in 3.1.12 |
|
| Back to top |
|
cnobes Smarty n00b
Joined: 26 Jul 2012 Posts: 2
|
Posted: Mon Aug 13, 2012 3:28 am Post subject: |
|
|
| Thanks for the quick fix. trying to upgrade to v3 and this was a show stopper for us. |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|