CodeIgniter Forums
how to build a codeigniter like ***navigation bar***(not menu)? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: how to build a codeigniter like ***navigation bar***(not menu)? (/thread-33144.html)



how to build a codeigniter like ***navigation bar***(not menu)? - El Forum - 08-17-2010

[eluser]basementDUDE[/eluser]
Is that a simple way to building a navigation bar like this:

CodeIgniter > Forum Home > CodeIgniter Development Forums > CodeIgniter Discussion

I was thinking using current_url function, but is that any another way to do it?


how to build a codeigniter like ***navigation bar***(not menu)? - El Forum - 08-17-2010

[eluser]WanWizard[/eluser]
Search for breadcrumb, I think someone has made a library for that...


how to build a codeigniter like ***navigation bar***(not menu)? - El Forum - 08-17-2010

[eluser]Met[/eluser]
known as breadcrumbs.

some functions are available ~
http://ellislab.com/forums/viewthread/93588/
http://ellislab.com/forums/viewthread/99982/

for one of my projects i simply passed a view an array lke this:
Code:
$data['breadcrumbs'] = array('site/index' => 'Home', 'site/about-us' => 'About Us', 'site/details' => 'Details');

// in my view:
<div class="breadcrumbs">
foreach($breadcrumbs as $bread => $crumb) {
    echo anchor($bread, $crumb) . ' > ';
}
</div>

$key is the function, $value is the text displayed in the crumb.

not particularly extendible or fancy, but it did the job for said project.


how to build a codeigniter like ***navigation bar***(not menu)? - El Forum - 08-17-2010

[eluser]mi6crazyheart[/eluser]
Have a look at here too: http://github.com/benedmunds/CodeIgniter-Breadcrumbs-Library


how to build a codeigniter like ***navigation bar***(not menu)? - El Forum - 08-17-2010

[eluser]basementDUDE[/eluser]
wow, you guys are really helpful.
Thank you very very much.