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

FieldSettings not included for Blocks #1539

Closed
horacioj opened this issue Mar 9, 2021 · 0 comments
Closed

FieldSettings not included for Blocks #1539

horacioj opened this issue Mar 9, 2021 · 0 comments

Comments

@horacioj
Copy link

horacioj commented Mar 9, 2021

Piranha v 9

Let's say you have a block like this:

    [BlockType(Name = "My stuff", Category = "My Category", Icon = "fas fa-fish", IsGeneric = true, ListTitle = "Title")]
    public class MyStuffBlock : Block
    {
        public StringField Title { get; set; }
        public TextField Body { get; set; }

        [Field(Placeholder = "Select any product from the application")]
        [ContentFieldSettings(Group = "Product")]
        public ContentField Product { get; set; }
    }

In the Manager you are allowed to select any content instead of just products.
The same code as Region works as expected.

Additional info by @GangsterGeek89 :

using the vue developer plugin I have just noticed that when a content field is in my page region it has settings object with the property group correctly set but when the content field is in a block the settings object is null. Pics to follow

68747470733a2f2f66696c65732e6769747465722e696d2f3563303662333866643733343038636534666230656538612f46355a4c2f7468756d622f436f6e74656e74426c6f636b322e706e67
68747470733a2f2f66696c65732e6769747465722e696d2f3563303662333866643733343038636534666230656538612f416259322f7468756d622f436f6e74656e74426c6f636b312e706e67

@tidyui tidyui added this to the Version 9.0 SR1 milestone Mar 16, 2021
@tidyui tidyui self-assigned this Mar 16, 2021
@tidyui tidyui changed the title ContentFields in Blocks aren't being filtered by Group FieldSettings not included for Blocks Mar 22, 2021
@tidyui tidyui closed this as completed in da63f9e Mar 23, 2021
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