I am trying to loop over a placeholder which returns for example: "word word word".
In my template I got this code:
{% placeholder "categorie" as icon %}
{% for i in icon.split %}
<i class="{{ i }}"></i>
{% endfor %}
However the as keyword is not working and the output is just the placeholder "word word word".
Am I missing something?
Placeholders in Django-CMS are intended to render content plugins. You can alter the contents of a placeholder programmtically (see "Plugin Context Processors" for more), but you can't assign the content plugins contained within a placeholder using as to another variable.
They literally render their content plugins in the order that they appear in, top-down in Django admin for your model field.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With