Skip to content

Commit 25bab41

Browse files
authored
Add promo block to the standard page block options (#282)
* Add promo block to the standard page block options
1 parent fcdeb8b commit 25bab41

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tbx/core/blocks.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,10 @@ class Meta:
894894
template = "patterns/molecules/streamfield/stream_block.html"
895895

896896

897+
class StandardPageStoryBlock(StoryBlock):
898+
promo = PromoBlock()
899+
900+
897901
class HomePageStoryBlock(blocks.StreamBlock):
898902
showcase = ShowcaseBlock(label="Standard showcase")
899903
homepage_showcase = HomepageShowcaseBlock(label="Large showcase with icons")

tbx/core/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from wagtail.search import index
1919
from wagtail.snippets.models import register_snippet
2020

21-
from .blocks import HomePageStoryBlock, StoryBlock
21+
from .blocks import HomePageStoryBlock, StandardPageStoryBlock
2222

2323

2424
@register_snippet
@@ -173,7 +173,7 @@ class StandardPage(
173173
):
174174
template = "patterns/pages/standard/standard_page.html"
175175

176-
body = StreamField(StoryBlock())
176+
body = StreamField(StandardPageStoryBlock())
177177

178178
content_panels = Page.content_panels + [
179179
FieldPanel("body"),

0 commit comments

Comments
 (0)