-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
How to name/ refer to footnotes in a block
In models.py I can generate footnotes as expected. Yet, if I use the same block it doesn't render the note. That is, I create and populates the notes in Admin, in the template they appear with the Admin with system's ref, and the footnotes section is empty - {% include "wagtail_footnotes/includes/footnotes.html" %}.
class Notes1Page(Page):
body = StreamField([
('fnotes', RichTextBlockWithFootnotes(label=("Feature type"), blank=True, default='abc',)),
]) ...
content_panels = Page.content_panels + [
FieldPanel('body', classname='full'), ...
]
this above works, but the below doesn't:
class ColumnBlock(blocks.StreamBlock):
paragraph = blocks.wagtail_footnotes.blocks.RichTextBlockWithFootnotes(editor='full', label='Paragraphe')
# error: 'wagtail.core.blocks' has no attribute 'wagtail_footnotes'
paragraph1 = blocks.RichTextBlock(editor='full', label='Paragraphe') #full' is defined in WAGTAILADMIN_RICH_TEXT_EDITORS/base.py,
paragraph2 = blocks.RichTextBlock(features=["bold", "italic", "link", "footnotes"], required=False, label='Paragraphe2')
paragraph3 = RichTextBlockWithFootnotes(features=["bold", "italic", "footnotes"], required=False, label='Paragraphe Notes1')
#Paragraph1-3 generate footnotes in the Admin, but don't render them in the template.
...
Reactions are currently unavailable