Hi,
It’s me again.
I’m using the plugin Kirby Builder with nested builders on a page. (I work on Kirby 3.4.2)
Here is my blueprint:
- width: 2/3
fields:
sectionBuilder:
label: Services / Formations
type: builder
columns: 1
max: 3
fieldsets:
content:
name: Service / Formation
fields:
contentName:
name: Nom
label: Nom du service / de la formation
type: text
contentIcon:
name: Icône
label: Icône du service / de la formation
type: text
contentBuilder:
name: Contenu
type: builder
max: 2
fieldsets:
argumentright:
name: Présentation - Image à droite
preview:
snippet: blocks/argumentright
css: /avocatms.fr/assets/css/blocks/argumentright.css
defaultView: preview
fields:
argumentrighttext:
label: Texte
type: textarea
buttons:
- bold
- italic
- '|'
- link
- '|'
- ol
- ul
argumentrightimage:
label: Image
type: files
multiple: false
argumentleft:
name: Présentation - Image à gauche
preview:
snippet: blocks/argumentleft
css: /avocatms.fr/assets/css/blocks/argumentleft.css
defaultView: preview
fields:
argumentlefttext:
label: Texte
type: textarea
buttons:
- bold
- italic
- '|'
- link
- '|'
- ol
- ul
argumentleftimage:
label: Image
type: files
multiple: false
argumenttextonly:
name: Présentation - Aucune image
preview:
snippet: blocks/argumenttextonly
css: /avocatms.fr/assets/css/blocks/argumenttextonly.css
defaultView: preview
fields:
argumenttextonlytext:
label: Texte
type: textarea
buttons:
- bold
- italic
- '|'
- link
- '|'
- ol
- ul
I can set my content easily, but I got the error Maximum function nesting level of ‘256’ reached, aborting! with my templates.
I got multiple templates/snippets:
- The page where i’m calling the first builder
...
<section class="about py-80" id="about">
<div class="container">
<div class="row">
<div class="offset-md-2 col-lg-8">
<div class="intro-box">
<?= $page->intro()->kt() ?>
</div>
</div>
</div>
<?php
foreach($page->sectionbuilder()->toBuilderBlocks() as $block):
snippet('blocks/' . $block->_key(), array('data' => $block));
endforeach;
?>
</div>
</section>
...
- The first snippet where I’m calling the 2nd builder
<section class="services py-100-70">
<div class="container">
<div class="row">
<div class="col-md-8 offset-md-2">
<div class="sec-title text-center">
<h1>
<i class="fal fa-<?= $data->contenticon() ?>"></i>
</h1>
<h2>
<?= $data->contentname() ?>
</h2>
</div>
</div>
</div>
</div>
<?php
foreach($page->sectionbuilder()->contentbuilder()->toBuilderBlocks() as $block):
snippet('blocks/' . $block->_key(), array('data' => $block));
endforeach;
?>
</section>
- And then my snippets for my blocks (they are working)
I’m not sure how to fix this, I think it’s creating an endless loop but I have only three blocks on my first builder and two on my second builder.
Thanks
EDIT: i can’t paste the third code, here is a pastebin https://pastebin.com/cRXcXf1P