Hello!
So, I designed and coded the following layout:
You can take a look at it at: https://estonoesradio.mx/acerca-de
Now, this large heading is made of:
- H1 heading
- Inner link/anchor tag
- Multiple snippets that build a āmini cardā with a link to another page and a footnote section.
The current markup (hardcoded) goes something like this:
<h1>Como casa productora independiente, <a href="<?php echo page('programas/esto-no-es-radio')->url(); ?>" data-uri="" data-title="<?php echo page('programas/esto-no-es-radio')->title(); ?>"><em>Esto no es radio</em></a> crea y distribuye programas con <?php echo snippet('modules/card.mini', ['page_checked' => $story_1, 'number' => '1']) ?> contenido humano, potente y sin fecha de caducidad <?php echo snippet('modules/card.mini', ['page_checked' => $story_2, 'number' => '2']) ?>.</h1>
My goal is to be able to reproduce this same layout and structure from within blocks. It can either be a Heading block with internal tags, a markdown block with (again) a tag or maybe a combination of multiple blocks. That is, I need the user to be able to edit this from within Kirby and make it dynamic.
First question:
- What would be the best way to be able to include snippets (with parameters) inside a heading (h1) block?
This is the actual snippet with needed parameters:
<?php echo snippet('modules/card.mini', ['page_checked' => $story_1, 'number' => '1']) ?>
Second question:
- Where or what should I be looking for to be able to add more fields to a link button inside the heading block?
Iād like to add a couple of ādata-ā fields here once the user click on the URL button. Maybe even include a page link inside one of these fields.
If we take a look at the anchor again from my previous example, I need a ādata-uriā and ādata-titleā for this work better.
<a href="<?php echo page('programas/esto-no-es-radio')->url(); ?>" data-uri="" data-title="<?php echo page('programas/esto-no-es-radio')->title(); ?>"><em>Esto no es radio</em></a>
I was thinking of making all heading blocks inline in that section only, and then insert those snippets or tags in between blocks, so everything would look like a list made out of blocks. But, I donāt know, I guess I found it a bit difficult and confusing to build custom blocks for something like this.
Any suggestions would be greatly appreciated!
Thanks!