Skip to content

Provide a core method to find out what templates are addable under a given parent #567

@Toutouwai

Description

@Toutouwai

It would be helpful if the core provided a method to find out what templates may be used for a page added under a given parent.

At first glance it seems like ProcessPageAdd::getAllowedTemplates() and ProcessPageAdd::isAllowedTemplate() might be useful for this purpose but they actually give incorrect results outside the context of ProcessPageAdd::execute(), as illustrated below.

The "news" template only allows children using the "news_item" template:
Image

Incorrect results using ProcessPageAdd methods:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions