本文整理汇总了PHP中common\models\Category::getBreadcrumbs方法的典型用法代码示例。如果您正苦于以下问题:PHP Category::getBreadcrumbs方法的具体用法?PHP Category::getBreadcrumbs怎么用?PHP Category::getBreadcrumbs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common\models\Category
的用法示例。
在下文中一共展示了Category::getBreadcrumbs方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
/*
* @author Lmy
* QQ:6232967
* Create at 2016-1-6 20:22:52
*/
use common\models\Category;
use yii\widgets\ListView;
$this->title = "列表_" . Category::getCategoryName($id);
$breadcrumbs = Category::getBreadcrumbs($id, "mobile/list", "id");
$this->params['breadcrumbs'] = $breadcrumbs;
?>
<div class="containter">
<?php
echo $this->render('_breadcrumbs');
?>
<div class="containter-zt">
<ul class="new-list">
<?php
echo ListView::widget(['dataProvider' => $dataProvider, 'itemOptions' => ['class' => 'item'], 'itemView' => '_listview_news', 'pager' => ['class' => \kop\y2sp\ScrollPager::className(), 'noneLeftTemplate' => '<div class="ias-noneleft" style="clear:both;text-align: center;">{text}</div>', 'triggerTemplate' => '<div class="ias-trigger" style="clear:both;text-align: center; cursor: pointer;"><a>{text}</a></div>', 'negativeMargin' => '10', 'triggerOffset' => 50], 'summary' => '']);
?>
</ul>
<div class="clear"></div>
<!--<div class="seemore"><a href="#">查看更多</a></div>-->
</div>
</div>
示例2:
<?php
/*
* @author Lmy
* QQ:6232967
* Create at 2015-12-26 17:58:01
*/
use common\models\Category;
$this->title = "列表_" . Category::getCategoryName($cid);
$breadcrumbs = Category::getBreadcrumbs($cid, "news/index", "cid");
$this->params['breadcrumbs'] = $breadcrumbs;
?>
<div class="container ">
<div class="container-left f-l">
<?php
echo $this->render('/layouts/_breadcrumbs');
?>
<ul class="zxzx">
<?php
foreach ($models as $k => $v) {
?>
<li>
<div class="zxzx-zt">
<div class="zxzx-zt-tit"><a href="<?php
echo Yii::$app->urlManager->createUrl(['news/show', 'id' => $v->id]);
?>
"><?php
echo $v->title;
?>
</a></div>
示例3: date
<?php
/*
* @author Lmy
* QQ:6232967
* Create at 2015-12-24 11:07:25
*/
$this->registerCssFile('@web/statics/css/style.css', ['depends' => ['frontend\\assets\\AppAsset']]);
use common\models\Category;
$this->title = $model->title;
$breadcrumbs = Category::getBreadcrumbs($model->category_id, "news/index", "cid");
$this->params['breadcrumbs'] = $breadcrumbs;
echo $this->render('/layouts/_breadcrumbs');
?>
<div class="wrapper">
<div class="wrapper-news-l">
<div class="wrapper-news-l-body margin-bottom25">
<div class="article-title">
<h4 class="margin-top20"><?php
echo $model->title;
?>
</h4>
<div class="article-fb"><span class="see">(<?php
echo $model->views;
?>
)</span><span>作者:<?php
echo $model->author;
?>
</span><span>时间:<?php
echo date("Y.m.d", $model->created_at);