I'm not sure I got your question right, but are you wondering that the
array starts empty with each page? If so, this is not a bug but a
feature. To add trails you will have to call addCrumb several times. I
also described this here:
http://www.tobman.com/blog/using-breadcrumbs-with-cakephp/
Cheers,
tobi_one
On Jul 28, 4:01 pm, leo <ponton....@gmail.com> wrote:
> As this worked in an earlier release, and nobody has responded to my
> previous post, I'm wondering if this is maybe a bug. If so, I'll log
> it.
>
> Some time ago I used the bread crumb functionality of HtmlHelper
> without a great deal of difficulty.
>
> Now, a year or so on, I'm at it again. This time I'm developing in a
> full release: 1.2.3.8166 (previously it was RC2 or RC3) and it doesn't
> seem to
> work. I don't have access to my previous code for reference.
>
> The symptoms are that when I addCrumb, the $html->_crumbs array
> appears to be created afresh for each page visited. The crumbs array
> seems to be going out of
> scope.
>
> The following code fragment from an_element.ctp which is included by
> the layout, default.ctp:
>
> debug($html->_crumbs);
> $html->addCrumb($this->name,$this->params['url']['url']);
> debug($html->_crumbs);
>
> always yields this, or similar, output as the site is navigated, i.e.
> an array with 0 or 1 elements:
>
> Array
> (
> )
>
> Array
> (
> [0] => Array
> (
> [0] => Proposals
> [1] => proposals/view/5
> [2] =>
> )
>
> )
>
> I'm a bit confused here and would appreciate any pointers to what I'm
> failing to do.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment