Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-03-2008, 07:40 PM
Junior Member
 
Join Date: Aug 2008
Posts: 9
Arrow Breadcrumb implementation...

Hi all,

Im a ZF newbie so bare with me. Ive been working with it for a few weeks and love it.

My main problem with it however is the lack of a "right way" of doing things.. there seems to be no agreed structure etc so it makes it extremely difficult when searching for answers on the web.

Basically I am trying to implement a breadcrumb structure into my application. The simple answer might be a view helper that simply takes the current action, controller etc from the URL so example.com/news/uk is transformed into: Home >> News >> UK.

As you are already thinking this is a poor implementation for many obvious reasons. My question then is how would you propose I implement this? Maybe initialise the breadcrumb trail in the front controller? Then add to the trail in respective controller actions? So in front controller I could initialise a trail and add "Home"... then in the NewsController I could assign "News" and then in the UKaction I could assign "UK". Does this sounds viable? How would I initialise this in the front controller?

I really need help on this. Any help appreciated.

Regards,

David
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-04-2008, 12:09 PM
Junior Member
 
Join Date: Jul 2008
Location: England
Posts: 1
Default

Have you seen this article?

Breadcrumbs with Zend Framework | Joey Adams Dot Net

That helped me out with my code.

~Dan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-05-2008, 05:51 PM
Junior Member
 
Join Date: Apr 2008
Posts: 6
Default

I'm doing mine somewhat manually. At the end of each controller action I have
PHP Code:
$this->view->layout()->breadcrumbs = array(
    
sprintf('/%s'$this->slug)           => $this->view->league['title'],
    
sprintf('/%s/standings'$this->slug) => 'Standings'
); 
And in my layout script I do some basic processing, and implode the results to get a nice list of parent pages.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-10-2008, 11:43 AM
Junior Member
 
Join Date: Jan 2008
Posts: 2
Default

Quote:
Originally Posted by taylord1 View Post
Have you seen this article?

Breadcrumbs with Zend Framework | Joey Adams Dot Net

That helped me out with my code.

~Dan

<33 Awesome
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-03-2008, 04:08 PM
Junior Member
 
Join Date: Nov 2008
Posts: 1
Default

Quote:
Originally Posted by drj201 View Post
Hi all,

Im a ZF newbie so bare with me. Ive been working with it for a few weeks and love it.

My main problem with it however is the lack of a "right way" of doing things.. there seems to be no agreed structure etc so it makes it extremely difficult when searching for answers on the web.

Basically I am trying to implement a breadcrumb structure into my application. The simple answer might be a view helper that simply takes the current action, controller etc from the URL so example.com/news/uk is transformed into: Home >> News >> UK.

As you are already thinking this is a poor implementation for many obvious reasons. My question then is how would you propose I implement this? Maybe initialise the breadcrumb trail in the front controller? Then add to the trail in respective controller actions? So in front controller I could initialise a trail and add "Home"... then in the NewsController I could assign "News" and then in the UKaction I could assign "UK". Does this sounds viable? How would I initialise this in the front controller?

I really need help on this. Any help appreciated.

Regards,

David
I wrote an article that might just help you:
http://blog.tommilewski.net/2008/10/...dcrumb-helper/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:04 AM.