Skip to content

Add rules for inherit templates #5020

@vivazzi

Description

@vivazzi

Hello! I want to suggest some idea. Many times I need inherit template for child templates, which don't use for ancestor. For example:

| home_page - template_1.html
| -- page_1 - template_2.html
| ---- page_1.1 - template_3.html
| ---- page_1.2 - template_3.html
| ---- page_1.3 - template_3.html

Now if I use CMS_TEMPLATE_INHERITANCE is True (by default) and I want to use template_3.html for page_1.1, page_1.2, page_1.3 I need select template_3.html for each child page. It's spend time if there are many pages ( > 10 ).
I want to suggest to add rules for inherit templates. For example:

TEMPLATE_INHERIT_RULES = {'template_2.html': 'template_3.html'}

So when I will create child page for page_1 (which have template_2.html), Django CMS will check TEMPLATE_INHERIT_RULES and see that for template_2.html is need to create child page with template_3.html. And so I don't need select template by hand.

I hope that my idea is clear.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions