I try to generate a var name from another var value. To be more specific I'm in a loop and I try to display all parameters of an object, based on the loop incrementation. Example: I have a list of objects categories. I have an object diplayer which contain parameters cat_1, cat_2, cat_3 etc I try to do something like this
{% for category in categories %}
{{ displayer.cat_(category.id) }}
{% endfor %}
Of course my probleme is (category_id) I really don't know how to get value of category.id to use it in the param name of the object.
For information I can not use a dictionary in place of the object displayer.
An idea?
Thanks a lot