Add Menu positions

  • I would like to add a footer menu to theme "One", which by default only has only two menu positions (main and offcanvas).

    Currently I have added the menu links manually in a text widget assigned to the footer position. But the lack of real menu items makes it impossible to e.g. display header images.


    Up to now I have found out that menu positions are added in the index.php (similar to Joomla CMS).

    But I'm not sure where / how to edit the template.


    Maybe someone has already accomplished that and is able to support me'?

  • Hi Ben


    I can highly recommend this tutorial: https://pagekit.com/docs/tutorials/theme . You can learn how to add widget positions in this step: https://pagekit.com/docs/tutorials/theme#layout


    You can also add menu positions: https://pagekit.com/docs/tutorials/theme#navbar



    But: You should not edit the files of the theme you just downloaded, because once the theme gets an update all of your changes are gone.


    You should fork the theme ("clone" and rename it) and customize it - or build your own from scratch.

  • Managed to display the menu as a vertical list by adding the following source code within the template.php...


    <!-- Render footer menu position -->

    <div class="uk-navbar-flip uk-hidden-small">

    <?php if ($view->menu()->exists('footer')) : ?>

    <?= $view->menu('footer') ?>

    <?php endif ?>

    </div>


    Which changes do I have to make / styles do I have to assign to get a horizontal menu?

  • SPQRInc : Danke! Ich hatte ohnehin vor, mich in der Dokumentation weiter einzulesen. Für das Projekt hatte ich mir schnelle Hilfe erhofft.

    Es geht mittlerweile nur noch ums Styling.


    P.S. Wir hatten die Tage Kontakt bzgl. der Verschlüsselung der E-Mail-Adressen... nochmals vielen Dank dafür!

  • Hi @digitalMe


    As I alread said: Have a look at https://pagekit.com/docs/tutorials/theme#navbar :)


    You can add a menu position and style it just the way you want to :)


    Just create the layout (here: menu-navbar.php) and include it like this:


    PHP
    1. <?php if ($view->menu()->exists('main')) : ?> <div class="uk-navbar-flip"> <?= $view->menu('main', 'menu-navbar.php') ?> </div> <?php endif ?>

    The best solution is to go through the tutorial to learn everything you need :)


    And - I said that already - do not modify the files of the theme. They are lost if you update it.


    Just fork it or build your theme from scratch :)

  • SPQRInc : Danke! Ich hatte ohnehin vor, mich in der Dokumentation weiter einzulesen. Für das Projekt hatte ich mir schnelle Hilfe erhofft.

    Es geht mittlerweile nur noch ums Styling.


    P.S. Wir hatten die Tage Kontakt bzgl. der Verschlüsselung der E-Mail-Adressen... nochmals vielen Dank dafür!


    You are welcome :) Just a quick note: I understand German - but the most members of this international community don't - so the forum language is English :)


    Have a nice evening - I'm going to bed now. If we can help you just let me and the community know :)