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
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-23