<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## articles標簽 | 標簽名 | 作用 | 包含屬性 | | --- | --- | --- | | articles | 獲取文章列表 | field,where,limit,order,page,relation,pageVarName,categoryIds,item | 標簽屬性: | 標簽屬性名 | 含義 | | --- | --- | | where | 查詢條件變量, 支持數組和字符串,如`$where` | | limit | 最多查出文章數,如果分頁開啟,此設置無效 | | order | 文章排序方式 | | page | 分頁參數,如果設置分頁參數會自動分頁 | | relation | 關聯查詢,支持`categories`和`user`,多個以英文逗號分隔 | | pageVarName | 分頁后生成的分頁變量名,只有設置分頁參數時才有效 | | categoryIds | 分類 id,支持數組和字符串(英文逗號分開)| > 5.0.180123版,優化portal:articles標簽所有屬性都支持PHP變量 ## 一個最新文章列表,不分頁 ``` <php> $category_ids=1; </php> <portal:articles limit="5" order="post.published_time DESC" categoryIds="$category_ids"> <dl class="dl-horizontal"> <dt> <a class="img-wraper" href="{:url('portal/Article/index',array('id'=>$vo.id,'cid'=>$vo['categories'][0]['id']))}"> <if condition="empty($vo.more.thumbnail)"> <img src="__TMPL__/public/assets/images/default_tupian4.png" class="img-responsive" alt="{$vo.post_title}"/> <else/> <img src="{:cmf_get_image_url($vo.more.thumbnail)}" class="img-responsive" alt="{$vo.post_title}"/> </if> </a> </dt> <dd> <a href="{:url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$vo['categories'][0]['id']))}">{$vo.post_title}</a> </dd> </dl> </portal:articles> ``` ## 一個文章列表,分頁 ```html <div> <php> $where=[ 'post.create_time'=>['egt',0] ]; </php> <portal:articles item="vo" where="$where" order="post.create_time DESC" page="10" relation="categories" categoryIds="$category.id" returnVarName="articles_data"> <div class="list-boxes"> <h2><a href="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$category['id']))}">{$vo.post_title}</a> </h2> <p>{$vo.post_excerpt}</p> <div> <div class="pull-left"> <div class="list-actions"> <a href="javascript:;"><i class="fa fa-eye"></i><span>{$vo.post_hits}</span></a> <a href="{:url('portal/Article/doLike',array('id'=>$vo['id']))}" class="js-count-btn"><i class="fa fa-thumbs-up"></i><span class="count">{$vo.post_like}</span></a> <a href="{:url('user/Favorite/add',array('id'=>$vo['id']))}" class="js-favorite-btn" data-title="{$vo.post_title}" data-url="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$category['id']))}" > <i class="fa fa-star-o"></i> </a> </div> </div> <a class="btn btn-warning btn-sm pull-right" href="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$category['id']))}">查看更多</a> </div> </div> </portal:articles> </div> <ul class="pagination"> <page/> </ul> ``` ## 一個文章列表,自定義分頁文字 > 5.0.180123版,優化portal:articles標簽可在模板里設置分頁參數和樣式 ```html <div> <php> $where=[ 'post.create_time'=>['egt',0] ]; $page=[ 'list_rows'=>10, 'next'=>'下一頁', 'prev'=>'上一頁' ]; </php> <portal:articles item="vo" where="$where" order="post.create_time DESC" page="$page" relation="categories" categoryIds="$category.id" returnVarName="articles_data"> <div class="list-boxes"> <h2><a href="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$category['id']))}">{$vo.post_title}</a> </h2> <p>{$vo.post_excerpt}</p> <div> <div class="pull-left"> <div class="list-actions"> <a href="javascript:;"><i class="fa fa-eye"></i><span>{$vo.post_hits}</span></a> <a href="{:url('portal/Article/doLike',array('id'=>$vo['id']))}" class="js-count-btn"><i class="fa fa-thumbs-up"></i><span class="count">{$vo.post_like}</span></a> <a href="{:url('user/Favorite/add',array('id'=>$vo['id']))}" class="js-favorite-btn" data-title="{$vo.post_title}" data-url="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$category['id']))}" > <i class="fa fa-star-o"></i> </a> </div> </div> <a class="btn btn-warning btn-sm pull-right" href="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$category['id']))}">查看更多</a> </div> </div> </portal:articles> </div> <ul class="pagination"> <page/> </ul> ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看