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
0
votes
1 answer

Get Image and intro text from wagtail page chooser

I am incorporating a page chooser in wagtail admin, however what I want to get is the image for each item in the streamblock for the page chooser and was wanting to know if there is a way to do this. So lets say if I have a category index page I…
0
votes
1 answer

Group blocks from StreamField Wagtail

What am I trying to achieve will be easier to explain on lists. e.g list_of_blocks=[1,2,3,4,5,6,7,8,9,10,11,12] block_first_row = list_of_blocks[:3] block_rest_rows = [list_of_blocks[i:i+4] for i in range(3, len(list_of_blocks), 4)] block_rows =…
Andreew4x4
  • 469
  • 4
  • 18
0
votes
2 answers

Wagtail set default page explorer view location for PageChooserBlock in admin

Way to browse pages from particular location in PageChooserBlock, like browse "sub pages or same level pages" from current editing page in which this block is used. I observed that when any page is selected in PageChooserBlock then browsing starts…
0
votes
1 answer

Wagtail - issue with streamfields off the page?

Has anyone had this issue in Wagtail 2.10.1 where the streamfields seem to be going off the page and under the grey side bar cutting off the left hand side of all the fields? I've attached an image to show what I'm going on about: Streamfields going…
Life By Ben
  • 186
  • 5
0
votes
1 answer

{{ self.article_title }} tag did not show up webapplications on wagtail

what I want I will build up one web application by wegtail like News distribution app. I made class on Blocks.py, inherited into models.py and coded on html to show them up. This class means to input article information like title and url and to…
0
votes
1 answer

Getting the page url within a block in Wagtail

Using Wagtail 2.9, I am trying to create a block that allows to share its text content to Twitter. The block itself is straightforward: class QuotableShare(StructBlock): text = TextBlock(required=True) class Meta: icon =…
Aquiles Carattino
  • 910
  • 1
  • 10
  • 23
0
votes
1 answer

How to copy page-privacy to Block in Wagtail?

Pages have this privacy setting where one can set who is allowed to see a particular page. My documentation requires a bit more granular lever where for a specific block one could also set to restrict its visibility. I would be quite content with a…
velis
  • 8,747
  • 4
  • 44
  • 64
0
votes
1 answer

Top-level StreamBlock within StreamField doesn't render in template

I'm attempting to use a StreamBlock like the last snippet in the section of the docs here, as the only argument to a StreamField. It's working perfectly in the Wagtail admin, but when trying to render in the template nothing appears. I tried using…
0
votes
1 answer

How to JSON serialize APIField of StreamField using a ListBlocks of PageChooserBlocks

hi guys my head is spinning trying to figure this out. I cant get a response from a streamfield api using blocks.PageChooserBlock. I need to deserialize the JSON but am out of juice. I get this error Object of type 'TimelineEvent' is not JSON…
0
votes
1 answer

In Wagtail streamfield template how to check if a field of a structblock inside a structblock is null?

I have a StructBlock like this : class CardBlock(blocks.StructBlock): header= blocks.StructBlock([ ("text", blocks.CharBlock(required=False, help_text="Header text")), ("classes", blocks.CharBlock(required=False, help_text="Header css…
shiv
  • 9
  • 3
0
votes
1 answer

How do I assign an edit panel for a StructBlock in Wagtail?

I have a StructBlock like this: class JumbotronBlock(blocks.StructBlock): fullwidth= blocks.BooleanBlock(requried=False, help_text="Full width of the viewport") heading= blocks.CharBlock(required=True, help_text="Heading for the jumbotron") lead=…
shiv
  • 9
  • 3
0
votes
1 answer

How to render sub block template from another block in Wagtail

I am learning Wagtail and Django. And I got an issue with the following code. Main goal is to have separate block templates for carousel items and carousel itself. When I start this code in Wagtail with added carousel items, I see that block…
John Doe
  • 21
  • 5
0
votes
1 answer

Is it possible to use vue.js with wagtail stream-fields without using DRF?

is it possible to use vue.js with wagtail stream-fields without using DRF? I would like to use wagtail and vue.js without going the headless route. So is it possible to use vue.js as part of wagtail's stream-field?
DST
  • 71
  • 8
0
votes
1 answer

I want to access struct block default ID in its template

I want to save stream field ID into it's template. In short, in text_question.html I am giving id = {{ self.id }} but that return Nothing. I want this because in question.html file I want it to compare with {{ field.id }} which return stream field…
Meet Mangukia
  • 97
  • 1
  • 6
0
votes
1 answer

How to add "caption" tag in TableBlock template in StreamField?

I'd like to add tag for tables created with TableBlock in StreamField, to make the tables more accessible and semantically correct. Right now, the default template doesn't have that tag. I'm not sure how I should be customizing the…
shuttlezed
  • 25
  • 4