How I can make navigations pages links in codeigniter.
Like this:
Main_page > page_1 > page_1_chiled
So the user can click any of these pages and go to it directly.
Thank you
How I can make navigations pages links in codeigniter.
Like this:
Main_page > page_1 > page_1_chiled
So the user can click any of these pages and go to it directly.
Thank you
Assume you controller name is media
. And there are some methods
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Media extends CI_Controller
{
public function __construct()
{
parent::__construct();
}
public function press()
{
# Press Relese
}
public function tele()
{
# Televistion Relses
}
public function social()
{
# Social realse
}
}
Create file call breadcumb.php
in view. Inside
<? if ($this->uri->segment(1) == 'Media') { ?>
<ul>
<li><a href="<?= base_url() ?>">Home</a></li>
<li>»</li>
<li><a href="">Media</a></li>
<li>»</li>
<li class="first">You Are Here</li>
</ul>
<? } ?>
<? if ($this->uri->segment(1) == 'Media' && $this->uri->segment(2) == 'press') { ?>
<ul>
<li><a href="<?= base_url() ?>">Home</a></li>
<li>»</li>
<li><a href="">Media</a></li>
<li>»</li>
<li><a href="">press</a></li>
<li>»</li>
<li class="first">You Are Here</li>
</ul>
<? } ?>
<? if ($this->uri->segment(1) == 'Media' && $this->uri->segment(2) == 'tele') { ?>
<ul>
<li><a href="<?= base_url() ?>">Home</a></li>
<li>»</li>
<li><a href="">Media</a></li>
<li>»</li>
<li><a href="">tele</a></li>
<li>»</li>
<li class="first">You Are Here</li>
</ul>
<? } ?>
<? if ($this->uri->segment(1) == 'Media' && $this->uri->segment(2) == 'social') { ?>
<ul>
<li><a href="<?= base_url() ?>">Home</a></li>
<li>»</li>
<li><a href="">Media</a></li>
<li>»</li>
<li><a href="">social</a></li>
<li>»</li>
<li class="first">You Are Here</li>
</ul>
<? } ?>