當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。