So first off, I wanted to say that I'm fairly positive I'm following the instructions provided both in the official documentation as well as SO posts that echo the documentation, as well as those that provide a bit of a different solution.
Either way, it's not working for me.
One of my questions revolves around how this code is appearing in my text editor. I'm attaching an image to demonstrate how the jinja2 code is being formatted -- everything inside the <li>
element is being italicized and the double ==
also seems to be behaving strangely.
Here is the portion of code represented in the image:
<ul class="side-link-container center-align">
{% for href, id, caption in navigation_bar %}
<li{% if id == active_page %} class="active"{% endif
%}><a href="{{ href|e }}">{{ caption|e }}</a>
</li>
{% endfor %}
It is identical pretty much with what is dictated in the jinja2 docs (the other portions of this code, namely the for loop for the navigation bar and the set activate page assignment, both in the child template and that layout.html, are not shown here.
Any advice or help with getting active page to be classed as such as I can style it accordingly in the nav? Thanks.