Welcome Guest, Not a member yet? Register   Sign In
Dynamic menu with template
#1

(This post was last modified: 11-18-2021, 01:48 PM by pippuccio76.)

Hi , this is my layout :

Code:
<?= $this->include('templates/header_admin') ?>

<?= $this->renderSection('custom_css') ?>

<?= $this->include('templates/menu_admin') ?>

<?= $this->renderSection('content') ?>
   
<?= $this->include('templates/footer_admin') ?>

<?= $this->renderSection('script') ?>

<?= $this->include('templates/end_html') ?>
 

I want insert a method called for every page (menu is the same for every controllers) , where put i the method to be accessible for every  view ?
Reply
#2

The method should be placed in the menu view that the layout loads.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Sorry but method can be only on controller It Is true ?
Reply
#4

Quick self-plug for my dynamic menus library: https://github.com/tattersoftware/codeigniter4-menus
Reply




Theme © iAndrew 2016 - Forum software by © MyBB