Is it possible to have menu.php for 2 purposes?
1. It creates a template (thanks to cms:template + cms:editable)
2. It contains HTML tags for embedding menu.php into index.php, about.php...
Menu.php:
1. It creates a template (thanks to cms:template + cms:editable)
2. It contains HTML tags for embedding menu.php into index.php, about.php...
Menu.php:
- Code: Select all
<?php require_once("admin/cms.php");?>
<cms:template title="Menu" icon="menu" executable='0'>
<cms:repeatable name="menu" label="Menu" desc="změny se propíší do hlavního menu, mobilního menu i zápatí">
<cms:editable name="menu_name" label="Název položky" type="text"/>
<cms:editable name="link" label="Odkaz" type="text"/>
</cms:repeatable>
</cms:template>
<!-- Nav -->
<div class="hidden h-10 font-alata md:flex md:space-x-8">
<cms:show_repeatable "menu">
<a href="<cms:show link/>" class="mx-2 border-b-2 border-transparent hover:border-blue-50"><cms:show menu_name/></a>
</cms:show_repeatable>
</div>
<?php COUCH::invoke();?>