Skip to content

{% block <name> required %} #1147

@ddevault

Description

@ddevault

This is a feature request for blocks which are required to be implemented by the leaf template. One example of where this would be useful is in title blocks. In the parent template:

{% block title required %}{% endblock %}

And in the child:

{% extends "example.html" %}
{% block title %}
<title>My Page</title>
{% endblock %}

If the title block is not present in the latter, an error is rased. If the block has any contents other than whitespace or comments in the former, an error is raised. In effect, this requires all pages to have titles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions