k1low/breadcrumb

Breadcrumb plugin for CakePHP

Fund package maintenance!
k1LoW

Installs: 3 501

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:cakephp-plugin

1.0.1 2015-03-08 16:16 UTC

This package is auto-updated.

Last update: 2024-12-06 09:01:01 UTC


README

Usage

in Controller

<?php
    class PostsController extends AppController
    {
        public $components = [
            'Breadcrumb.Breadcrumb',
        ];

        public function beforeFilter()
        {
            parent::beforeFilter();
            $this->Breadcrumb->append('Mypage', ['controller' => 'users', 'action' => 'mypage']);
        }

        public function add()
        {
            ...

            $this->Breadcrumb->append('List Post', ['controller' => 'posts', 'action' => 'index']);
            $this->Breadcrumb->append('Add post');
        }

    }

in View

<?php echo $this->element('Breadcrumb.breadcrumb'); ?>