I apologize in advance if I am just overthinking this and missing something obvious (feels like I am). I have a situation on a category page where I am wanting to override a block in the document this one is extending, but only if the category is equal to a specific value ('Smith' in this case). If I put the conditional outside the block definition, I keep getting an internal server error. But if I put it inside the block definition, then it will override the block on every category page, not just this one. I'm trying to avoid having multiple templates and instead just hide one nav section on one category page. Please let me know if you need any more information. Thanks in advance for any advice!!
Here are the two versions of the code that I have tried. First gives the Internal Server error, second overrides the block for all pages.
{% if category.title == 'Smith' %}
{% block nav %} {% endblock %}
{% endif %}
{% block nav %}
{% if category.title == 'Smith' %} {% endif %}
{% endblock %}