[Fixed]-Django placeholder areas

1đź‘Ť

I have found the answer to this query and it is as follows:

<div class="highlighter">
    <h3>Application forms</h3>
    {% block page_downloads_area %}
    {% placeholder "Application Forms” or %}
    <p>We currently have no vacancies</p>
    {% endplaceholder %}
    {% endblock %}
</div>

It turns out that blocks are not allowed in conditionals so if we give it a variant as such then if their isn’t content it displays a note, if their is it displays the content. Tidy little workaround.

👤Keith Riches

Leave a comment