I wondered whether this module would solve a particular use case I have so decided to do a test. The use case is to split the content in an existing layout between a sidebar (left) and main content block. I wanted to use field blocks for some fields in the sidebar
- I created a new site (1.22) in Lando and installed
devel
and mini_layouts
- I used
devel
to create lots of nodes
- I created a layout (regular) for posts using Boxton (no sidebars) called 'Articles'
- I created a flexible layout template for a single row with 2 columns (33%/67%)
- I created a mini layout using the template, added the context of 'Get node ID from path' with
node/%
- I added main content to the 67% and the
field:field_block:node-field_image
to the sidebar
- In the regular layout for articles I removed main content and added the mini layout block in its place.
This is what articles now look like:
This is in Basis with no extra styling.
Details
layout.flexible.mini_content_sidebar.json
{
"_config_name": "layout.flexible.mini_content_sidebar",
"name": "mini_content_sidebar",
"title": "Mini Content Sidebar",
"description": "Displays a sidebar next to the content in a mini layout",
"rows": {
"089793f2-3501-40ef-b800-d0d8a53c545b": {
"contains": "region_4_8",
"element": "div",
"classes": "",
"container": "container",
"region_names": {
"region_0": {
"label": "Sidebar",
"name": "mini-sidebar",
"region_class_enable": 0,
"classes": ""
},
"region_1": {
"label": "Content",
"name": "mini-content",
"region_class_enable": 0,
"classes": ""
}
}
}
}
}
layout.mini_layouts.mini_sidebar.json
{
"_config_name": "layout.mini_layouts.mini_sidebar",
"path": "node/%",
"name": "mini_sidebar",
"block_title": "",
"title": "Mini Sidebar",
"description": "",
"renderer_name": "standard",
"module": "mini_layouts",
"weight": 0,
"storage": 2,
"layout_template": "mini_content_sidebar",
"disabled": false,
"settings": {
"title": "",
"title_display": "default",
"title_block": null
},
"positions": {
"089793f2-3501-40ef-b800-d0d8a53c545b--0": [
"974646cf-16a1-49ab-b400-f759186f9e16"
],
"089793f2-3501-40ef-b800-d0d8a53c545b--1": [
"d97bba9d-7f75-4ce7-992b-4364c8534726"
],
"title": []
},
"contexts": [],
"relationships": [],
"content": {
"974646cf-16a1-49ab-b400-f759186f9e16": {
"plugin": "field:field_block:node-field_image",
"data": {
"status": 1,
"module": "field",
"delta": "field_block",
"settings": {
"title_display": "default",
"title": "",
"style": "default",
"block_settings": [],
"contexts": [],
"label": "hidden",
"formatter": "image",
"formatter_settings": {
"image_style": "",
"image_link": "",
"image_float": "",
"image_load": "auto"
},
"delta_offset": 0,
"delta_limit": "",
"delta_reversed": 0,
"admin_label": "",
"admin_description": ""
},
"uuid": "974646cf-16a1-49ab-b400-f759186f9e16",
"style": {
"plugin": "default",
"data": {
"settings": {
"classes": ""
}
}
}
}
},
"d97bba9d-7f75-4ce7-992b-4364c8534726": {
"plugin": "system:main",
"data": {
"status": 1,
"module": "system",
"delta": "main",
"settings": {
"title_display": "none",
"title": "",
"style": "default",
"block_settings": [],
"contexts": [],
"admin_label": "",
"admin_description": ""
},
"uuid": "d97bba9d-7f75-4ce7-992b-4364c8534726",
"style": {
"plugin": "default",
"data": {
"settings": {
"classes": ""
}
}
}
}
}
}
}
layout.layout.article.json
{
"_config_name": "layout.layout.article",
"path": "node/%",
"name": "article",
"title": "Article",
"description": null,
"renderer_name": "standard",
"module": null,
"weight": 0,
"storage": 1,
"layout_template": "boxton",
"disabled": false,
"settings": {
"title": "",
"title_display": "default",
"title_block": null
},
"positions": {
"header": [
"9017c335-8a91-4fba-8426-38747f19780b",
"d3883e89-ec40-4e4f-a200-afcf762560fa"
],
"top": [
"812f1b74-32c3-44e7-bf06-6be0d3375547",
"f47addfc-0fcc-4100-a000-c87723d082ac"
],
"content": [
"33ac8271-3269-45a9-bc00-b01963f8bcb5"
],
"bottom": [],
"footer": [
"2f556c71-41b4-41a1-ab05-5a652d828f9f"
],
"title": []
},
"contexts": [],
"relationships": [],
"content": {
"9017c335-8a91-4fba-8426-38747f19780b": {
"plugin": "system:header",
"data": {
"status": 1,
"module": "system",
"delta": "header",
"settings": {
"title_display": "default",
"title": "",
"style": "default",
"block_settings": {
"menu": "user-menu",
"logo": 1,
"site_name": 1,
"site_slogan": 1
},
"contexts": []
},
"uuid": "9017c335-8a91-4fba-8426-38747f19780b",
"style": {
"plugin": "default",
"data": {
"settings": {
"classes": ""
}
}
}
}
},
"d3883e89-ec40-4e4f-a200-afcf762560fa": {
"plugin": "system:main-menu",
"data": {
"status": 1,
"module": "system",
"delta": "main-menu",
"settings": {
"title_display": "none",
"title": "",
"style": "default",
"block_settings": {
"style": "dropdown",
"level": 1,
"depth": 0
},
"contexts": []
},
"uuid": "d3883e89-ec40-4e4f-a200-afcf762560fa",
"style": {
"plugin": "default",
"data": {
"settings": {
"classes": ""
}
}
}
}
},
"812f1b74-32c3-44e7-bf06-6be0d3375547": {
"plugin": "system:breadcrumb",
"data": {
"status": 1,
"module": "system",
"delta": "breadcrumb",
"settings": {
"title_display": "default",
"title": "",
"style": "default",
"block_settings": [],
"contexts": []
},
"uuid": "812f1b74-32c3-44e7-bf06-6be0d3375547",
"style": {
"plugin": "default",
"data": {
"settings": {
"classes": ""
}
}
}
}
},
"f47addfc-0fcc-4100-a000-c87723d082ac": {
"plugin": "system:page_components:title_combo",
"data": {
"status": 1,
"module": "system",
"delta": "page_components",
"settings": {
"title_display": "default",
"title": "",
"style": "default",
"block_settings": [],
"contexts": [],
"title_tag": "h1",
"title_classes": "page-title",
"tab-type": "both",
"tab_type": "both"
},
"uuid": "f47addfc-0fcc-4100-a000-c87723d082ac",
"style": {
"plugin": "default",
"data": {
"settings": {
"classes": ""
}
}
}
}
},
"33ac8271-3269-45a9-bc00-b01963f8bcb5": {
"plugin": "mini_layouts:mini_sidebar",
"data": {
"status": 1,
"module": "mini_layouts",
"delta": "mini_sidebar",
"settings": {
"title_display": "none",
"title": "",
"style": "default",
"block_settings": [],
"contexts": [],
"admin_label": "",
"admin_description": ""
},
"uuid": "33ac8271-3269-45a9-bc00-b01963f8bcb5",
"style": {
"plugin": "default",
"data": {
"settings": {
"classes": ""
}
}
}
}
},
"2f556c71-41b4-41a1-ab05-5a652d828f9f": {
"plugin": "system:powered-by",
"data": {
"status": 1,
"module": "system",
"delta": "powered-by",
"settings": {
"title_display": "default",
"title": "",
"style": "default",
"block_settings": [],
"contexts": []
},
"uuid": "2f556c71-41b4-41a1-ab05-5a652d828f9f",
"style": {
"plugin": "default",
"data": {
"settings": {
"classes": ""
}
}
}
}
}
},
"conditions": [
{
"plugin": "node_type",
"data": {
"settings": {
"bundles": [
"post"
],
"load_condition_nojs": "Load condition"
}
}
}
]
}
type - question