Subclassing BaseBlock gives me an "Advanced setting" in the editor, but the custom_css_class is not available in the template
I love the "Advanced settings" fields in the blocks in crx, but when I try to subclass BaseBlock in my own blocks I see the advanced settings fields in the editor, they're saved correctly, but does not appear anywhere on my object instance and is not available in my templates. What am I doing wrong?
from coderedcms.blocks import BaseBlock
from wagtail.core.blocks import BooleanBlock
from wagtail.snippets.blocks import SnippetChooserBlock
class FamousQuoteBlock(BaseBlock):
"""This will insert a famous quote block"""
quote = SnippetChooserBlock("quotes.Quote", required=False)
random_quote = BooleanBlock(required=False)
class Meta:
icon = "user"
form_classname = "quote-block struct-block"
template = "quotes/blocks/quote_block.html"
Within the block, it should be available as self.settings. You can see an example template here that is using self.settings.custom_css_class: https://github.com/coderedcorp/coderedcms/blob/dev/coderedcms/templates/coderedcms/blocks/image_block.html
Closing this due to inactivity. Feel free to re-open if you are still experiencing the issue or have any new information. Thanks!