Skip to content

Commit ccf5a2a

Browse files
authored
Release 0.4.1 (#59)
* Release 0.4.1 * Update README
1 parent 4bdff4d commit ccf5a2a

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ A block must have at least one preset to appear for selection in the Theme Edito
115115

116116
## Theme block targeting
117117

118-
A section or group that accepts theme blocks can indicate either that it accepts all blocks (and apps) by adding `"blocks": [{ "type": "@theme" }, { "type": "@app" }]` to the schema. Or it can target specific blocks by adding `"blocks": [{ "type": "slide" }]`
118+
A section or group that accepts theme blocks can indicate either that it accepts all blocks (and apps) by adding `"blocks": [{ "type": "@theme" }, { "type": "@app" }]` to the schema. Or it can target specific blocks by adding `"blocks": [{ "type": "slide" }]`.
119+
120+
By default, the block picker will show all theme blocks, but there are cases where you might want to control the blocks that are available to add. Theme developers can name a block with an underscore prefix to exclude it from appearing in the block picker for sections and theme blocks that accept blocks with type `@theme`.
121+
122+
For example, `slide` is a type of block that should only be available in `slideshow` sections. This can be done by naming your slide block `blocks/_slide` and in your `slideshow` section, you can target it by using `"blocks": [{ "type": "_slide" }]`.
119123

120124
## Static theme blocks
121125

config/settings_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "theme_info",
44
"theme_name": "Reference theme",
5-
"theme_version": "0.4.0",
5+
"theme_version": "0.4.1",
66
"theme_author": "Shopify",
77
"theme_documentation_url": "https://help.shopify.com/manual/online-store/themes",
88
"theme_support_url": "https://support.shopify.com/"

sections/slideshow.liquid

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{
2222
"name": "Slideshow",
2323
"class": "section--has-background",
24-
"blocks": [{ "type": "slide" }],
24+
"blocks": [{ "type": "_slide" }],
2525
"settings": [
2626
{
2727
"type": "header",
@@ -77,7 +77,7 @@
7777
"name": "Slideshow",
7878
"blocks": [
7979
{
80-
"type": "slide",
80+
"type": "_slide",
8181
"blocks": [
8282
{
8383
"type": "group",
@@ -130,7 +130,7 @@
130130
]
131131
},
132132
{
133-
"type": "slide",
133+
"type": "_slide",
134134
"blocks": [
135135
{
136136
"type": "group",

templates/index.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "slideshow",
55
"blocks": {
66
"slide_mEbteL": {
7-
"type": "slide",
7+
"type": "_slide",
88
"settings": {
99
"layout": {
1010
"flex-direction": "row"
@@ -82,7 +82,7 @@
8282
]
8383
},
8484
"slide_aWAGX7": {
85-
"type": "slide",
85+
"type": "_slide",
8686
"settings": {
8787
"layout": {
8888
"flex-direction": "row"

0 commit comments

Comments
 (0)