StreamField(
[
('section', StructBlock(
[
('section_heading_en', TextBlock(label='Heading [en]')),
('pages', ListBlock(
PageChooserBlock(label="Page", page_type=[InformationPage, ServicePage]),
help_text='Select existing pages in the order you want them \
to display within each heading.\
Pages should be added only once to any single guide.')
),
],
label="Section"
)),
],
verbose_name='Add a section header and pages to each section',
blank=True
)
This is sorta puesdo code/bad formatting, but ideally I ought to be able to do something like:
Hi @easherma , to clarify: is your request to allow defining "anonymous" StructBlockFactories inline on a StreamFieldFactory declaration - i.e. not by subclassing StructBlockFactory separately?
Similar to https://github.com/mvantellingen/wagtail-factories/issues/12
I have a case like this:
This is sorta puesdo code/bad formatting, but ideally I ought to be able to do something like: