changelog

New template tag for randomizing content

April 29, 2024

We've added a new template tag to Buttondown's automation engine: {% random_number a b %}, which generates a random number between a and b.

You can use it like this:

{% load random_numbers %}

{% random_number 0 1 as number %}

{% if number %}
[Click this link](https://google.com?utm_source=a)
{% else %}
[Smash this link](https://google.com?utm_source=b)
{% endif %}

Updated on

April 29, 2024

Written by

Justin Duke

Justin Duke is a software engineer, lover of words, and the creator of Buttondown.

No credit card required. Only pay for what you use. Cancel anytime.