Skip to content

Commit cedafd9

Browse files
committed
Fixed issues with block rendering (model name, block name)
1 parent e658d6c commit cedafd9

File tree

4 files changed

+13
-18
lines changed

4 files changed

+13
-18
lines changed

content/contents.lr

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
_model: Home
1+
_model: home
22
---
33
_template: home.html
44
---
5-
body:
6-
5+
block_content:
76
#### hero ####
8-
9-
title: Creative Commons
10-
---
7+
title: Creative Commons Title
8+
----
119
content:
12-
13-
Creative Commons
10+
Creative Commons content

models/home.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ label = {{ this.title }}
66
label = Title
77
type = string
88

9-
[fields.body]
10-
label = Body
9+
[fields.block_content]
10+
label = Block Content
1111
type = flow
12-
flow_blocks = hero, get-involved
12+
flow_blocks = hero
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{% block title %}{{ this.title }}{% endblock %}
2-
<div >
3-
{{ this.content }}
4-
</div>
2+
<div>
3+
{{ this.content }}
4+
</div>

themes/vocabulary_theme/templates/home.html

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
{% block title %}{{ this.title }}{% endblock %}
33

44
{% block body %}
5-
6-
{% for block in this.body.blocks %}
5+
{% for block in this.block_content.blocks %}
76
{{ block }}
87
{% endfor %}
9-
10-
{% endblock %}
8+
{% endblock %}

0 commit comments

Comments
 (0)