rikiless/breadcrumb-component 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rikiless/breadcrumb-component

Composer 安装命令:

composer require rikiless/breadcrumb-component

包简介

Basic component rendering breadcrumb for websites using Nette Framework

README 文档

README

Basic component rendering breadcrumb for websites using Nette Framework.

Included template is compatible with Bootstrap 3.2 *

Requirements

This package requires PHP 5.4.

Installation

The best way to install this package is using Composer:

$ composer require "rikiless/breadcrumb-component:@dev"

And register the factory in config.neon:

services:
    - Rikiless\BreadcrumbComponent\IControl

Use

Inject to presenter:

class Presenter ...
{

    /**
     * @var Rikiless\BreadcrumbComponent\IControl
     * @inject
     */
    public $breadcrumbControl;

    public function createComponentBreadcrumb()
    {
        return $this->breadcrumbControl->create();
    }

}

Render in template:

{control breadcrumb}

Add items to breadcrumb

class CatalogPresenter ...
{

    public function actionEpisode($id)
    {
        //$episode = ...($id);

		$this['breadcrumb']
			->add('Series', $this->link('Homepage:genres'))
			->add($episode->show->name, $this->link('Homepage:show', $episode->show->url))
			->add('All episodes', $this->link('Homepage:episodes', $episode->show->url))
			->add($episode->show->name);
    }

}

Custom template

You can use your own template by this way:

class Presenter ...
{

    public function createComponentBreadcrumb()
    {
        $breadcrumb = $this->breadcrumbControl->create();
        $breadcrumb->setTemplate(__DIR__. '/../templates/_breadcrumb.latte');
        return $breadcrumb;
    }

}

Translations

Translations are supported.

Examples

Example 1

Example 2

* In default template is use of classes .visible-sm mixed with .visible-lg and it seems to be broken in Bootstrap 3.1.

统计信息

  • 总下载量: 69
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固