CyberAP Well-known member Nov 18, 2011 #2 After a bit of searching found the answer: http://xenforo.com/community/threads/xenforo-template-syntax.23245/#post-288416 It is not possible. If anyone knows how to create an array within templates please share your soultion Upvote 0 Downvote
After a bit of searching found the answer: http://xenforo.com/community/threads/xenforo-template-syntax.23245/#post-288416 It is not possible. If anyone knows how to create an array within templates please share your soultion
Rigel Kentaurus Well-known member Nov 18, 2011 #3 CyberAP said: After a bit of searching found the answer: http://xenforo.com/community/threads/xenforo-template-syntax.23245/#post-288416 It is not possible. If anyone knows how to create an array within templates please share your soultion Click to expand... 1) Do it in the view and pass it to the template 2) Do it in the template_create hook and add it to the template params Upvote 0 Downvote
CyberAP said: After a bit of searching found the answer: http://xenforo.com/community/threads/xenforo-template-syntax.23245/#post-288416 It is not possible. If anyone knows how to create an array within templates please share your soultion Click to expand... 1) Do it in the view and pass it to the template 2) Do it in the template_create hook and add it to the template params
CyberAP Well-known member Nov 18, 2011 #4 Unfortnately I am not a coder and was searching for an easy way to do it But thanks for the help! Upvote 0 Downvote
CyberAP Well-known member Apr 5, 2012 #5 If anyone it still wondering it is possible to do, just do it like this: <xen:set var="prop.var1">1</xen:set> <xen:set var="prop.var2">2</xen:set> And you'll get an array 'prop' with two cells: var1 and var2 Upvote 0 Downvote
If anyone it still wondering it is possible to do, just do it like this: <xen:set var="prop.var1">1</xen:set> <xen:set var="prop.var2">2</xen:set> And you'll get an array 'prop' with two cells: var1 and var2
Jake Bunce Well-known member Apr 5, 2012 #6 Yeah I was gonna say... Here is an example of this: http://xenforo.com/community/resources/display-a-random-banner.375/ Upvote 0 Downvote
Yeah I was gonna say... Here is an example of this: http://xenforo.com/community/resources/display-a-random-banner.375/
xfrocks Well-known member Apr 5, 2012 #7 <xen:set /> works great. Or if you just want to pass an array to some helper, you can use {xen:array} too. Upvote 0 Downvote
<xen:set /> works great. Or if you just want to pass an array to some helper, you can use {xen:array} too.