Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict BlockItemType for ContentType as in Pages and Posts #1841

Open
ClausRogisch opened this issue Mar 29, 2022 · 1 comment
Open

Restrict BlockItemType for ContentType as in Pages and Posts #1841

ClausRogisch opened this issue Mar 29, 2022 · 1 comment

Comments

@ClausRogisch
Copy link

It would be nice, for Content implementing IBlockContent, to be able to restrict the usable Blocks, as is implemented for Pages and Posts via the BlockItemTypeAttribute

In the ContentTypeBuilder, possibility to adapt code for PageType to ContentType (and maybe also for ContentGroup)
`
// Add block types
var blockTypes = type.GetCustomAttributes();
foreach (var blockType in blockTypes)
{
pageType.BlockItemTypes.Add(blockType.Type.FullName);
}

return pageType;
`

@ClausRogisch
Copy link
Author

#1889 made the changes to use [BlockItemTypeAttribute] on [ContentType] to restrict the available Blocks in the Manager when adding Blocks to the ContentType.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants