Solved: How to Dynamic breadcrumbs based on uri segment?? |
[eluser]CtheB[/eluser]
Hi, Does somebody know somethin' like a helper for dynamic breadcrumbs based on uri? Somethin' like this: (But then smarter and less code. So you can have unlimited breadcrumbs.) Code: <?php I tried to rewrite it with more for loops in it. but i can't figure it out yet: Code: <?php Thnx for helping me out! Greetz Carlos
[eluser]bitist[/eluser]
Not sure, but if I understand you want something to regenerate the uri without the empty parts. If yes try this code: Code: $new_uri='';
[eluser]xwero[/eluser]
Code: $urls = array(); Code: array( array('http://site.com/controller','controller'), array('http://site.com/controller/method','method'))
[eluser]CtheB[/eluser]
Thank you xwero, That's exactly where i was searching for.. the uri segment_array() doh! I should had looked better in the user guide prob.. I made only 1 small adjustment: Code: $urls = array(); Now i can echo the content so easily ![]() Code: foreach($urls as $key => $value) Thanks again ![]() PS. Devpedia thanx for helping, but xwero's alternative was where i was searching for..
[eluser]bd3521[/eluser]
Sweet thanks. Just have to remove the echo ' >> '; prior to the first segment. |
Welcome Guest, Not a member yet? Register Sign In |