Welcome Guest, Not a member yet? Register   Sign In
Best way to implement dynamic site-wide menu?
#1

Hi,

Currently got a template to handle views, looks like this:

Code:
<?php $this->load->view('v_nav');?>
<div class="container-fluid">

<div id="header">
<?php $this->load->view('v_header');?>
</div>

<div id="main">
<?php $this->load->view($view);?>
</div>

<div id="footer">
<?php $this->load->view('v_footer');?>

the view 'v_nav' is simply hard-coded html of all the menu options.

So I'm considering putting the menu options in a table and generating the menu dynamically from that table.

I've got the code written to generate the necessary html from the table just trying to work out the best way to implement it.

Don't really want to have to pass another parameter into the template.

So, question is, is there a way to generate the html dynamically and have it available to echo out in the template?

Cheers
Reply


Messages In This Thread
Best way to implement dynamic site-wide menu? - by blackbulldog - 06-04-2018, 02:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB