• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Showing nav links

#1
[eluser]xtremer360[/eluser]
I'm not sure how to accomplish this. I have this code in my model for my website:

Code:
function getFooterNav()
    {
        $this->db->select('link_name,short_name,');
        $this->db->from('site_menu_structures_links');
        $this->db->join('site_menu_structures', 'site_menu_structures.id = 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:

Code:
<?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);
        }
        else
        {
            $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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.