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:
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:
### Discussed in https://github.com/estruyf/vscode-front-matter/discussions/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:
<img width="732" alt="Xnapper-2023-12-07-10 33 39-CBB59F44-23D1-47CE-B11C-9BA860C09C99" src="https://github.com/estruyf/vscode-front-matter/assets/2900833/01489169-c934-470a-9a4d-ebdf40bd1aac">
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:
<img width="692" alt="Screenshot 2023-12-07 at 10 34 06" src="https://github.com/estruyf/vscode-front-matter/assets/2900833/7b9cc3bf-305a-4f28-96d6-8ac324a9194f">
<!-- github-sync-id:2030315011 -->
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:
```json
{
"frontMatter.taxonomy.contentTypes": [
{
"name": "parent",
"pageBundle": true,
"previewPath": null,
"allowAsSubContent": true,
"fields": [
...
]
}
]
}
```
Example of a child configuration:
```json
{
"frontMatter.taxonomy.contentTypes": [
{
"name": "child",
"pageBundle": true,
"previewPath": null,
"isSubContent": true,
"fields": [
...
]
}
]
}
```
<!-- github-comment-id:1845047399 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Discussed in https://github.com/estruyf/vscode-front-matter/discussions/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 pagepageBundleproperty. 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
allowAsSubContentsetting is enabled, the author should get the question to create it as sub-content or main content:When
yesis picked, or when thesubContentproperty is set totrue, the author will get a dialog to pick the folder from the content location: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:
Example of a child configuration: