Hi,
Sorry if this is obvious but I’m not PHP expert and new to Kirby.
I would like to create a vertical tabs using Tabby Js.
This is the structure I’ve:
<div class="vertical-tabs">
<ul data-tabs>
<?php foreach($page->tab()->toStructure() as $tab) : ?>
<li><a href="#<?= $tab->tabId() ?>">
<?= $tab->tabTitle() ?></a>
</li>
<?php endforeach ?>
</ul>
<div class="vertical-tabs-content">
<?php foreach($page->tab()->toStructure() as $tab) : ?>
<div id="<?= $tab->tabId() ?>">
<?= $tab->tabDescription()->kirbytext() ?>
</div>
<?php endforeach ?>
</div><!-- /vertical-tabs-content -->
</div><!-- /vertical-tabs -->
This code works, but I need to insert the selected item width: data-tabby-default.
Thanks for the help.