coderedcorp / coderedcms

Wagtail + CodeRed Extensions enabling rapid development of marketing-focused websites.
https://www.coderedcorp.com/cms
Other
685 stars 133 forks source link

Help removing image selection from Navbar snippet #581

Open ShubhamKarala opened 1 year ago

ShubhamKarala commented 1 year ago

I need help with removing the image selection that is in coderedcms.models.navbar model. Is there a way to modify coderedcms.blocks.content_blocks.NavBaseLinkBlock where it is being imported from?

class NavBaseLinkBlock(BaseBlock):
    display_text = blocks.CharBlock(
        required=False,
        max_length=255,
        label=_("Display text"),
    )
    image = ImageChooserBlock(
        required=False,
        label=_("Image"),
    )

image = ImageChooserBlock( required=False, label=_("Image"), )

vsalvino commented 4 months ago

Sorry, the navbar and NavBaseLinkBlock are not customizable. The built-in navbar is really limited, and in practice, we end up building custom navbars for each site.

I'd recommend implementing a custom navbar. In the next release, we are going to provide a pre-built one, which you can follow the example of here: (look in website/models.py and website/templates/website/): https://github.com/coderedcorp/coderedcms/tree/main/coderedcms/project_template/pro