当前位置: 首页>>代码示例>>PHP>>正文


PHP Category::getBreadcrumbs方法代码示例

本文整理汇总了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>
开发者ID:James88,项目名称:www.yubin.com,代码行数:27,代码来源:list.php

示例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>
开发者ID:James88,项目名称:www.yubin.com,代码行数:31,代码来源:zixunzhongxin.php

示例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);
开发者ID:James88,项目名称:www.yii2.com,代码行数:31,代码来源:show.php


注:本文中的common\models\Category::getBreadcrumbs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。