Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

[Solved] Using smarty {rand} in master.view.tpl doesn't work

clethrillclethrill ✭✭
edited October 2011 in Vanilla 2.0 - 2.8
When I change the bonk message to come up with an error report I get a whole lot of stuff including the words " modifier 'rand' is not allowed ".

I was wanting to use the rand attribute to use a random banner.

I used {assign var="random" value=1|:rand:12}


< span class="<{$random}>" > ... < /span >

(spaces were used so it didn't read as html)


  • so it doesn't like any | (which seem to be 'modifiers') not that I know much about smarty. Instead am now using

    {math equation='rand(1,12)'}
Sign In or Register to comment.