分享
  • 收藏
  • 举报
    X
    请问辅助栏目如何在模板中调用文章?
    814
    10

    我现在这样调用只能取到全部

    {volist name="listdb" id="rs"}

                <li class="first"> <a target="_blank" href="{:iurl('content/show','id='.$rs['aid'])}" class="pic">{notempty name="rs.picurl"} <img src="{$rs.picurl|tempdir}" width="205" height="150">{/notempty}

                  <p class="txt">{$rs.title|get_word=40}</p>

                  </a>

                  <div class="media-list-user-goods"> <a target="_blank" href="{$rs.url}" class="c-img" title="{$rs.uid|get_user_name}"> <img src="{$rs.uid|get_user_icon|tempdir}" width="24" height="24"> </a>

                    <div class="c-txt"> <a target="_blank" href="{$rs.url}" class="title" title="{$rs.uid|get_user_name}">{$rs.uid|get_user_name}</a> <span>{$rs.title|get_word=25}</span> </div>

                  </div>

                </li>

             {/volist}

    如果需要动态调用不同栏目怎么写呢?用{qb:tag}来写直接报错

    app\common\model\C

    请问各位大神该怎么处理?

    11
    赏礼
    赏钱
    收藏
    点击回复
        全部留言
    • 10
    • 素之美 风格开发者 消费:495.25元 2019-08-19 17:25 17:256楼
      {volist name="listdb" id="rs"}	
      {$rs.title}
      {:get_url('user',['uid'=>$rs['uid']])}
      {/volist}

      https://vip.vip1688.wang/bbs/category/index/fid/1.html

      素之美 消费:495.25元 2019-08-19 18:10
      参考栏目调用,对比数据库,我目前没有那么些辅栏目,原理是一样的。
      hxbsj88 消费:4013.66元 其他手机 2019-08-19 19:05
      @素之美,弄几个单页面模板,适合专题或栏目页面用
      Baymax 消费:0元 2019-08-19 17:31
      大神,我这个页面不是要读取个人主页了,是需要按分类显示内容
       1 英国
       2     ┝ 利物浦
       3     ┝ 伦敦
       4         ┝ 玩什么
       5         ┝ 吃什么
       6         ┝ 概述
       7         ┝ 实用指南

      分别显示在
      【概述】 【玩什么】【吃什么】 【实用指南】这四个分类滑动门里面
      素之美 消费:495.25元 2019-08-19 17:39
      {volist name=":fun('Category@sortlist',0,'bbs')" id="rs"}
      <a href="{:urls('category/index',"fid=$key")}" target="_blank">
      <img src="{$rs.fengmian} "> 
      {$rs.name}                                                                                                        
      {/volist}


      Baymax 消费:0元 2019-08-19 17:47
      读不出内容啊
      Baymax 消费:0元 2019-08-19 17:49
      这几个栏目时cms下的辅助栏目
      Baymax 消费:0元 2019-08-19 17:53
      我是用一个页面中的4个滑动门分别读取伦敦下面的4个子栏目读不出,主栏目我读出来了
    0 赏钱 赏礼回复
    • 素之美 风格开发者 消费:495.25元 2019-08-19 16:59 16:596楼
      {:get_url('user',['uid'=>$rs['uid']])}


      Baymax 消费:0元 2019-08-19 17:20
      {volist name=":get_url('user',['uid'=>$rs['uid']])" id="rs"}
      这样写度不出内容啊概述这个分类里有一篇文章,没读出来
       1 英国
       2     ┝ 利物浦
       3     ┝ 伦敦
       4         ┝ 玩什么
       5         ┝ 吃什么
       6         ┝ 概述
       7         ┝ 实用指南
    0 赏钱 赏礼回复
    更多回复
    恢复多功能编辑器
  • 3 1
  • 推荐内容
    扫一扫访问手机版
    请选择要切换的马甲:

     
    网页即时交流
    QQ咨询
    咨询热线
    020-28998648