I think
Direct elif condition inside elif condition will not work.
You can write like this
{% if condition1 %}
# Code to execute when condition1 is true
{% elif condition2 %}
# Code to execute when condition2 is true
{% if nested_condition1 %}
# Code to execute when nested_condition1 is true
{% elif nested_condition2 %}
# Code to execute when nested_condition2 is true
{% else %}
# Code to execute if none of the nested conditions are true
{% endif %}
{% else %}
# Code to execute if none of the outer conditions are true
{% endif %}
Does anyone have an idea about this? My problem persists.
I receive an error when I use the “elif” line within the “if else” statement. Another point is that I still get the same error when I assign a variable with “set.”
You could try to reduce complexity, for instance replacing the conditions with “true”, “True”, “False”, change the texts (like, no keywords in the rest of the html), etc., until the error goes away, then take it from there.