Template Help - 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: Template Help (/showthread.php?tid=35932) |
Template Help - El Forum - 11-15-2010 [eluser]james182[/eluser] Hi i'm new to CI and was wanting help with getting the template to work. I'm using Ocular Template Libray 2.0, and DX_Auth and have setup the main layout as: Code: <?php echo $this->template->block('header', 'partials/header'); ?> now what i'm trying is to get the header to work on the backend/user (DX_Auth) "page". which looks like: Code: <?php echo $this->template->block('header', 'partials/header'); ?> errors are: A PHP Error was encountered Severity: Notice Message: Undefined variable: nav_list Filename: partials/header.php Line Number: 14 A PHP Error was encountered Severity: Warning Message: Invalid argument supplied for foreach() Filename: partials/header.php Line Number: 14 Below header.php Code: <div id="header-wrapper"> any help would be great. Template Help - El Forum - 11-16-2010 [eluser]Dennis Rasmussen[/eluser] The controller for your first (working) file sets the data for $nav_list (used in the header). The second example you've provided apparently doesn't have $nav_list applied to it from the controller. Does that make sense? Anyway there's no data for the header.php file in the 2nd example. It's missing. |