You can pass variables to stored templates using the arguments function (read the documentation for more info)
- You should first modify your stored templates to look like this
Code:
program:
arguments(date);
now = format_date(today(), 'yyyy-MM-dd');
if days_between(date, now) <= '1' then '#aaaaa'
elif days_between(date, now) <= '3' then '#bbbbb'
elif days_between(date, now) <= '7' then '#ccccc'
fi
- Now you can call the stored template with the date argument as follows:
Code:
program:
colours_daysbetween($#fanficupdated)