Skip to content

Enhancement: Allow to create sub-content #722

Closed

Description

@estruyf

Discussed in #715

Allow content to be created in a page bundle folder by specifying that the content is "sub-content". To support this, on the content type there should be two new properties introduced:

  • allowAsSubContent: Allows you to specify if you want to use the content type as a parent or create child-level content. This can be used in combination with the page pageBundle property. That way, you can create a hierarchy.
  • isSubContent: Specify this on the content-type if the content to be created with this is always going to be sub-content.

When the allowAsSubContent setting is enabled, the author should get the question to create it as sub-content or main content:

Xnapper-2023-12-07-10 33 39-CBB59F44-23D1-47CE-B11C-9BA860C09C99

When yes is picked, or when the subContent property is set to true, the author will get a dialog to pick the folder from the content location:

Screenshot 2023-12-07 at 10 34 06

Activity

  1. added a commit that references this issue on Dec 7, 2023
  2. estruyf commented on Dec 7, 2023

    @estruyf
    OwnerAuthor

    First implementation is in place and it can be tested out with the latest beta version.

    Example of a parent configuration which can be used for both creation as page bundle or sub-content:

    {
      "frontMatter.taxonomy.contentTypes": [
        {
          "name": "parent",
          "pageBundle": true,
          "previewPath": null,
          "allowAsSubContent": true,
          "fields": [
            ...
          ]
        }
      ]
    }

    Example of a child configuration:

    {
      "frontMatter.taxonomy.contentTypes": [
        {
          "name": "child",
          "pageBundle": true,
          "previewPath": null,
          "isSubContent": true,
          "fields": [
            ...
          ]
        }
      ]
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions