Hi,
I’m designing a modular one-pager with the new blocks feature.
So I’ve created custom blocks like hero, biography, etc.
I’ve also created one called activity, and I put in this custom block another system of blocks.
Everything works fine, however when I call my blocks in my template, nothing appears.
Here are my codes:
site/templates/home.php
<?php snippet('header') ?>
<?= $site->onepager()->toBlocks() ?>
<?php snippet('footer') ?>
site/snippets/blocks/activity.php
<?= $block->content()->toBlocks() ?>
<!-- This is a test to see if something is loading -->
<?= $block->text()->kt() ?>
site/blueprints/site.yml
title: Site
columns:
- width: 2/3
sections:
onepagerSection:
type: fields
fields:
onepager:
type: blocks
fieldsets:
[…]
activity:
name: Contenu
tabs:
content:
name: Contenu
fields:
title:
label: Titre
type: text
content:
label: Contenu
type: blocks
# This is a test to see if something is loading
text:
label: Texte
type: textarea
settings:
[…]
You can see that I added a textarea for testing purpose. So my textarea is loading but nothing from my block in block. I can add my content with blocks in the custom block activity, but nothing is visible on the front end.
Did I miss something? or is it something impossible to achieve?
Thanks!