CodeIgniter Forums
Adding Menu into View page - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Adding Menu into View page (/showthread.php?tid=48793)



Adding Menu into View page - El Forum - 01-29-2012

[eluser]Tanvir[/eluser]
Hello,m new to CI. I want to embed a custom MENU into a view file.
I have a template file where different views are added.
Code:
<?php// template .php
$this->load->view("includes/header");
$this->load->view("includes/leftNav.html");
$this->load->view($main_content);
$this->load->view("includes/footer");
?>
Now I have added the custom menu code to the leftNav.html file but its NOT working. But if I open the leftNav.html independently,it shows the menu well.But CI isnt showing the menu. Menu has its own javascript/images etc files in a separate folder.The menu is built by a menu-builder software. How should I add stylish menu into my CI page/views.


Adding Menu into View page - El Forum - 01-29-2012

[eluser]vbsaltydog[/eluser]
You don't use file extensions with the loader class.

... And why is it a .html when .php parses html and php code?


Adding Menu into View page - El Forum - 01-29-2012

[eluser]InsiteFX[/eluser]
move the css and js files to your header.php

And as vbsaltydog said change the leftNav.html to leftnav.php

These are all simple php and html coding...