I’m using kirby builder to add multiple textblocks to an page in the panel. And am outputting footnotes from each textblock with kirby footnotes. All good.
One problem of course, is that kirby footnotes in this setup generates footnotes for each textblock. So I tried to solve this like here
I think you have ended up with a string and your trying to do field stuff with it but its no longer a field. I think the proceeding code is an attempt to combine the fields so that Kirby thinks its one single field. I dont think thats the way to do it, but i also dont know the correct way. Im sure someone with a bigger brain then mine will be along soon…
…but my guess is that its expecting text() to be a field. What happens if you do:
echo KirbyFootnotes::bibliography($ftt->kt());
If i understand your code correctly youve set $ftt programmatically to be a field as far as Kirby is concerned. Assuming you’ve done that right, then going straight into kt() should work i think.
Thinking about it though, you still have a problem. What @texnixe just posted will generate the list of footnotes in the right order under all the builder textfields but the superscript numbers within the text that links to them will still be numbered from one for each text block, so now you need to fix those?
Oh yes of course u do. Javascript it is then. Might have SEO implications though. Search engines are getting clever these days, but theres a chance they might see the original links before they have been manipulated with javascript.
Sure, I know they are only internal links but i’ve got a feeling they will get seen as broken links if it doesn’t match up with a corresponding element on the page though.