定制 2fox/yii2-breadcrumbs 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

2fox/yii2-breadcrumbs

Composer 安装命令:

composer require 2fox/yii2-breadcrumbs

包简介

yii2 breadcrumbs Schema.org support

README 文档

README

https://schema.org/BreadcrumbList

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist 2fox/yii2-breadcrumbs "*"

or add

"2fox/yii2-breadcrumbs": "*"

to the require section of your composer.json file.

Usage

Breadcrumbs

use twofox\breadcrumbs\Breadcrumbs;

echo Breadcrumbs::widget([
    'links' => [
        [
            'label' => 'Home',
            'url'   => ['/']
        ],
        [
            'label' => 'Contact',
            'url'   => ['/site/contact']
        ],
    ],
]);

or

use twofox\breadcrumbs\Breadcrumbs;

echo Breadcrumbs::widget([
    'links' => $this->params['breadcrumbs'],
]);

####result

<ol itemscope itemtype="http://schema.org/BreadcrumbList">
  <li itemprop="itemListElement" itemscope
      itemtype="http://schema.org/ListItem">
    <a itemprop="item" href="https://example.com/dresses">
    <span itemprop="name">Dresses</span></a>
    <meta itemprop="position" content="1" />
  </li>
  <li itemprop="itemListElement" itemscope
      itemtype="http://schema.org/ListItem">
    <a itemprop="item" href="https://example.com/dresses/real">
    <span itemprop="name">Real Dresses</span></a>
    <meta itemprop="position" content="2" />
  </li>
</ol>
```

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-23