Using Kirby Builder and Kirby Footnotes with multiple text blocks

I’m hoping to get some help with getting Kirby Footnotes working with Kirby Builder.

Everything works great except that the pages are made up of multiple text blocks, making the footnotes display under each block instead of at the end as a grouped list.

The page is currently set up like this (I’m guessing that the footnotes code would need to sit before the footer snippet?):

<?php snippet('header') ?>
<?php snippet('nav') ?>

foreach($page->mybuilder()->toBuilderBlocks() as $block):
  snippet('sections/' . $block->_key(), array('data' => $block));

<?php snippet('footer') ?>

And with the Kirby builder block text snippet like so (footnotes work here but as mentioned obviously being outputted under each individual text block):

<php # /site/snippets/sections/bodytext.php ?>
<section class="text">
  	<div class="row spc-sm">
		<div class="col-xs-7">
			<?= $data->text()->kirbytext() ?>
			<?= $data->text()->footnotes() ?>

Any help would be greatly appreciated :slight_smile:

Hm, good question. Since the footnotes work on a field basis, I guess they start with 1 for each block again?

@texnixe All good — thought that might be the case but wanted to double-check before going down another road.

@jjh Hi Julian,

I was curious if you managed to get it working or you went with another method?