We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I tried to extend the MainMenu item but unfortunately hitting save is only working the first time. The second time it is failing. Here is My code:
class CustomMainMenuItem(AbstractMainMenuItem): DISPLAY_ALWAYS = 0 DISPLAY_ONLY_LOGGEDIN = 1 DISPLAY_ONLY_LOGGEDOUT = 2 DISPLAY_CHOICES = ( (DISPLAY_ALWAYS, _('Show always')), (DISPLAY_ONLY_LOGGEDIN, _('Show only logged in')), (DISPLAY_ONLY_LOGGEDOUT, _('Show only logged out')), ) NORMAL = 0 HIGHLIGHTED = 1 ITEM_TYPE_CHOICES = ( (NORMAL, _('Normal')), (HIGHLIGHTED, _('Highlighted')), ) menu = ParentalKey( 'wagtailmenus.MainMenu', on_delete=models.CASCADE, related_name="custom_menu_items", # important for step 3! ) display_type = models.PositiveSmallIntegerField(default=DISPLAY_ALWAYS, choices=DISPLAY_CHOICES) item_type = models.PositiveSmallIntegerField(default=NORMAL, choices=ITEM_TYPE_CHOICES) hover_description = models.CharField( max_length=250, blank=True ) # Also override the panels attribute, so that the new fields appear # in the admin interface panels = ( PageChooserPanel('link_page'), FieldPanel('link_url'), FieldPanel('url_append'), FieldPanel('link_text'), FieldPanel('display_type'), FieldPanel('item_type'), FieldPanel('allow_subnav'), )
How to reproduce it:
The text was updated successfully, but these errors were encountered:
It is only not working while using 'condensedinlinepanel'
I guess there is a problem with choice fields. Is this a bug within condensedinlinepanel or wagtailmenus?
Sorry, something went wrong.
Hi @sowinski. This does look like a bug in condensedinlinepanel. The following existing issue looks very similar: wagtail-deprecated/wagtail-condensedinlinepanel#57
condensedinlinepanel
No branches or pull requests
Hi,
I tried to extend the MainMenu item but unfortunately hitting save is only working the first time. The second time it is failing.
Here is My code:
How to reproduce it:
The text was updated successfully, but these errors were encountered: