CodeIgniter Forums
Showing nav links - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Showing nav links (/showthread.php?tid=45929)

Showing nav links - El Forum - 10-11-2011

I'm not sure how to accomplish this. I have this code in my model for my website:

function getFooterNav()
        $this->db->join('site_menu_structures', ' = site_menu_structures_links.menu_structure_id');
        $this->db->where('site_menu_structures.short_name', 'footernav');
        $query = $this->db->get();
        return $query->result();

And this in my controller:

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Kowcontroller extends CI_Controller {

public function index()
        $this->load->model('kowmodel', 'kow');
        $siteStatus = $this->kow->getSiteStatus();
        if ($siteStatus[0]->site_is_down == 'Yes')
            $maintenancePageContent = $this->kow->getMaintenancePage();
            $this->data['content'] = $maintenancePageContent[0]->content;
            $this->load->view('maintenance', $this->data);
            $activeTemplate = $this->kow->getTemplate();
            $this->data['header_code'] = $activeTemplate[0]->header_code;
            $this->data['footer_code'] = $activeTemplate[0]->footer_code;
            $this->load->view('kow', $this->data);    

/* End of file kowcontroller.php */
/* Location: ./application/controllers/kowcontroller.php */

What I'm trying to do is if the site is UP and starts to load the template it'll load the active template from the database correctly however in the footer field in my db I need it to load structure links for the footer.

Not quite sure with everything there is how to accomplish this.