Monday, June 1, 2015

Re: Help with Breadcrumbs

Hola

Después del foreach has un pr($cat);
Nos muestras los resultados

Saludos

Enviado desde Gmail para Android en Moto G

www.oxicode.io

El may. 31, 2015 4:39 PM, "Jekill CR" <pcmancr@gmail.com> escribió:

Hi! friends i am  from Costa Rica and need some help with the breadcrumbs

This is the problem im trying to generate the breadcrumbs with this code in my view:


<?php foreach ($category as $cat): ?>


 <?php $this->Html->addCrumb('Categorias', array('controller' => 'categories', 'action' => 'index'));?>
 <?php $this->Html->addCrumb($cat['name'], array('controller' => 'categories', 'action' => 'view',$cat['id']));?>



<?php
    echo $this->Html->getCrumbs(' ► ', array(
    'text'=>'Inicio',
    'url' => array('controller' => 'anuncios', 'action' => 'index'),
    'escape' => false));
?>
<?php endforeach ?>



but jump a Notice:

InicioCategoriasJuguetes <<< Well formed breadcrumb
Notice (8): Undefined index: name [APP\View\Categories\view.ctp, line 276]
Notice (8): Undefined index: id [APP\View\Categories\view.ctp, line 276]
InicioCategoriasJuguetesCategorias<<< Bad formed breadcrumb

If you can help me with this error.

Thanks in advance!!!


--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: