+ Reply to Thread
Results 1 to 5 of 5

Thread: Breadcrumb implementation...

  1. #1
    drj201 is offline Junior Member
    Join Date
    Aug 2008
    Posts
    10

    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

  2. #2
    taylord1 is offline Junior Member
    Join Date
    Jul 2008
    Location
    England
    Posts
    3

    Default

    Have you seen this article?

    Breadcrumbs with Zend Framework | Joey Adams Dot Net

    That helped me out with my code.

    ~Dan

  3. #3
    SirAdrian's Avatar
    SirAdrian is offline Member
    Join Date
    Apr 2008
    Posts
    87

    Default

    I'm doing mine somewhat manually. At the end of each controller action I have [php]$this->view->layout()->breadcrumbs = array(
    sprintf('/%s', $this->slug) => $this->view->league['title'],
    sprintf('/%s/standings', $this->slug) => 'Standings'
    );[/php]

    And in my layout script I do some basic processing, and implode the results to get a nice list of parent pages.

  4. #4
    joeyadms is offline 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

  5. #5
    tmilewski is offline 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/

+ Reply to Thread

Similar Threads

  1. Smarty Implementation
    By blurphp in forum Integration with Third party tools
    Replies: 10
    Last Post: 12-11-2008, 09:23 PM
  2. Replies: 1
    Last Post: 10-31-2008, 09:25 PM
  3. Soap Webservice implementation
    By prasadk14 in forum General Q&A on Zend Framework
    Replies: 0
    Last Post: 09-12-2008, 04:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts