Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[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}

and

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

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

Best Answer

  • clethrillclethrill ✭✭
    Answer ✓
    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)'}

Answers

  • clethrillclethrill ✭✭
    Answer ✓
    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.