Questions tagged [wagtail-streamfield]

Wagtail-streamfield is the feature of Wagtail which let you create a sequence of blocks of different types to be rearranged as desired. Build and arrange your content blocks in any order: headings, paragraphs, images, video, and custom content types specific to your site.

Wagtail is a CMS for Django. Wagtail comes up with lots of features and wagtail-streamfield is one of it. It allows a user to build and arranges content blocks in any order: headings, paragraphs, images, video, and custom content types specific to a site. enter image description here

The outstanding characteristic of it is "Better Rich Text", "Classy Implementation","Simple Editing","Content economy".

170 questions
1
vote
1 answer

How to import a Wagtail page on all the other wagtail pages

I want to add some content on one of my Wagtail pages and I am trying to import that Wagtail page on all my other wagtail pages. The reason I am trying to do this is that if in the future I make a change on the content it should consistently reflect…
szm
  • 95
  • 8
1
vote
1 answer

Customizing Wagtail Streamfield

Can anyone provide the code necessary to create the Wagtail Streamfield options that are previewed on the wagtail.io website front page? https://media.wagtail.io/images/w1_5pmaP1U.original.width-1600.png Specifically, I'm interested in Aligned…
tufelkinder
  • 1,176
  • 1
  • 15
  • 37
1
vote
1 answer

Possible to have a on_delete=PROTECT on PageChooserBlock?

Let's say that I have an awesome Wagtail project. In this project I would like a Page where I can add unlimited Pages as links, the code would look like this: pages = StreamField([ ('link_page', blocks.PageChooserBlock(help_text='Link…
Igoranze
  • 1,506
  • 13
  • 35
1
vote
0 answers

How to determine wagtail Page content type within django template?

The core problem is that handling of wagtail RichTextField and StreamField is radically different in the templates. I'm trying to accomplish something similar to the following: {% with post=post.specific %} {% if post.content_type ==…
NarūnasK
  • 4,564
  • 8
  • 50
  • 76
1
vote
1 answer

How to access each field of wagtail FreeForm in HTML pages?

I have created wagtail FreeForm by extending WagtailFormBlock given below.I can create different form using wagtail admin interface. File name: blocks.py from wagtailformblocks.blocks import WagtailFormBlock class MyForm(WagtailFormBlock): …
1
vote
1 answer

Is it possible to limit a StreamField to accept exactly two blocks?

The title says it all, I haven't been able to find any other information online. I'm wondering if it is possible for me to get secondary_links = StreamField([ ('Page', SerialisedPageChooserBlock())]) to accept exactly two blocks.
jsindos
  • 459
  • 6
  • 22
1
vote
1 answer

get_FOO_display equivalent for ChoiceBlock

I have a block as follows: class SomeBlock(blocks.StructBlock): choice = blocks.ChoiceBlock(choices=(('Y', 'Yellow'), ...)) # more fields class Meta: template = 'myapp/blocks/some_block.html' In my template I have: {% load…
binadam
  • 13
  • 3
1
vote
1 answer

Wagtail;: ValueError: too many values to unpack (expected 2) when creating a large custom StructBlock for StreamField

I'm creating a StructBlock for StreamField. The goal is to create a block that will upload an image as well as a lot of metadata. The metadata is a mixture of CharBlocks, ImageChooserBlocks and RichTextBlocks. When I want to make the changes in…
1
vote
1 answer

Adding Additional Hallo.js formatting features to Wagtail CMS RichTextField

How can I enable halloformat underline and hallojustify in Wagtails RichTextEditor? There doesn't seem to be any documentation on this. Thank you.
1
vote
1 answer

Rendering streamfield block a certain way if booleanBlock is True

Hello I'm currently new to django/wagtail. I'm working on an about page that shows previous and current work/positions. I've made the positions streamfield blocks since the amount of experience isn't limited. Here is the code to my models. #Create…
1
vote
1 answer

Migrating Data In Wagtail

I was wondering is there is any documentation or good resources on migrating Page models, Streamfields, and Blocks in wagtail CMS. All of this seems to not be documented much.
David B
  • 345
  • 3
  • 14
1
vote
1 answer

Custom field panel performance in stream block

I'm using wagtailgmaps for add google maps feature to my project. Use it is easy, and i want add a stream block for use Google Maps block to the content. But, we have a big problem, this package only add a new edit_handler, it doesn't add a new…
SalahAdDin
  • 2,023
  • 25
  • 51
1
vote
1 answer

StructBlock within StreamField is rendered as text

I have an issue where I have a StrictBlock within a StreamField: class DetailsTableBlock(StructBlock): title = CharBlock(required=False) description = RichTextBlock(required=False) table =…
Dimitar Petrov
  • 667
  • 1
  • 5
  • 16
1
vote
1 answer

Use glyphicons or fontawesome icons within rich text

Is there an easy way to use glyphicons or fontawesome icons within the rich text? Please have a look at the following CKEditor plugin I post here as an illustration of the question. https://www.michaeljanea.com/ckeditor/bootstrap-glyphicon I failed…
1
vote
1 answer

Analogs for Placeholder from Django-CMS or Streamfield from Wagtail without cms itself

I often need to implement rich content editing in my django projects. There are a lot of different wysiwyg-editors, but they are not good for creating complex content structure. Placeholder from Django-CMS or Streamfield from Wagtail can do it much…
Antonio
  • 822
  • 1
  • 10
  • 19