0

I have followed cakephp version 4 breadcrumb documentation for create a simple breadcrumb. But here getting notice templates does not exist.

My effort

$this->Breadcrumbs->add(
    'add',
    ['controller' => 'Products', 'action' => 'add']
);

$this->Breadcrumbs->templates([
    'wrapper' => '<nav class="breadcrumbs"><ul{{attrs}}>{{content}}</ul></nav>',
]);


echo $this->Breadcrumbs->render(
    ['class' => 'breadcrumbs-trail'],
    ['separator' => '<i class="fa fa-angle-right"></i>']
);
Niloy Rony
  • 602
  • 1
  • 8
  • 23

1 Answers1

1

The documentation is outdated, the method is called setTemplates().

https://github.com/cakephp/docs/pull/6629

ndm
  • 59,784
  • 9
  • 71
  • 110