Search code examples
movabletype

Movable Type: How do I generate random number with certain range?


I am not sure this is even possible with just using Movable Type tags but, how do I display random number with in certain range?

For example I have 10 images named 1~10 and every time I rebuild I want to display a random image from that range.

I use MT5.

Thank you in advance!


Solution

  • You can try my version of the MTCollate plugin with random filter. Original documentation is here: http://www.nonplus.net/software/mt/MTCollate.htm - difference is that it adds a sort="~" or "random" filter, but you'll probably be fine using the MTShuffleList block.