联系官方销售客服

1835022288

028-61286886

求助 版主:论坛审计组
在独立模块的首页index.html中如何调用分页并设置条数
类型:迅睿CMS 更新时间:2021-04-15 09:23:21

在独立模块的首页index.html中,如何调用分页,并设置条数

回帖
  • 起名字很费劲
    #1楼    起名字很费劲
    2019-08-07 18:20:50
    Chrome 0

    6、自定义分页显示文章模块的数据(可以在任何页面)

    {module module=news page=1 pagesize=10 urlrule=index.php?s=news&page=[page]}
    .....
    {/module}
    {$pages}表示分页输出代码
    pagesize表示指定分页显示数据量
    urlrule表示分页地址规则,[page]参数必须有哦,否则分页链接不正常
  • 琉惗
    #2楼    琉惗
    2019-08-07 18:24:00
    Chrome 0
    <div class="news-list">
    <ul>
    {module catid=1 more=1 field=title,url,thumb,updatetime,description,keywords,hits,comments,uid,author,original order=updatetime page=1 pagesize=2 urlrule=index.php?s=bbs&page=[page]}
    <li class="media news-one">
    <a class="media-left" title="{$t.title}" alt="{$t.keywords}" href="{$t.url}">
    <img title="{$t.title}" alt="{$t.keywords}" src="{dr_thumb($t.thumb)}">
    </a>
    <div class="media-body">
    <div class="media_text">
    <h4 class="media-heading"><a title="{$t.title}" alt="{$t.keywords}" href="{$t.url}">{$t.title}</a></h4>
    <h5 class="news-remark fl">{$t.description}</h5>
    {if $t.original == 1}<span class="fr news-class">原创</span>{/if}
    </div>
    <h4 class="news-info">
    <small>
    <span class="man-img-man"><img src="{dr_avatar($t.uid)}">&nbsp;&nbsp;{$t.author}&nbsp;</span>
    <span class="news-time"><img width="31px" src="{THEME_PATH}pcbbs/picture/sj.png">&nbsp;&nbsp;{dr_date($t._updatetime)}</span>
    <span class="news-browse"><img src="{THEME_PATH}pcbbs/picture/news_view.png">{$t.hits}</span>
    </small>
    </h4>
    </div>
    </li>
    {/module}
    </ul>
    </div>
    <!-- 新闻列表 end-->
    <!-- 分页 <-->
    <div style="width: 900px;height: 120px;"> <style type="text/css">
    .pagination p{
    margin:0;
    cursor:pointer
    }
    .pagination{
    height:40px;
    padding:20px 0px;
    }
    .pagination a{
    display:block;
    float:left;
    margin-right:10px;
    padding:2px 12px;
    height:30px;
    border:1px #cccccc solid;
    background:#fff;
    text-decoration:none;
    color:#808080;
    font-size:12px;
    line-height:24px;
    }
    .pagination a:hover{
    color:#009688;
    background: white;
    border:1px #009688 solid;
    }
    .pagination a.cur{
    border:none;
    background:#009688;
    color:#fff;
    }
    .pagination p{
    float:left;
    padding:2px 12px;
    font-size:12px;
    height:30px;
    line-height:24px;
    color:#bbb;
    border:1px #ccc solid;
    background:#fcfcfc;
    margin-right:8px;

    }
    .pagination p.pageRemark{
    border-style:none;
    background:none;
    margin-right:0px;
    padding:4px 0px;
    color:#666;
    }
    .pagination p.pageRemark b{
    color:red;
    }
    .pagination p.pageEllipsis{
    border-style:none;
    background:none;
    padding:4px 0px;
    color:#808080;
    }
    .dates li {font-size: 14px;margin:20px 0}
    .dates li span{float:right}
    </style>
    <div class="pagination">
    {$pages}
    </div>
    </div>
    满意答案
  • 琉惗
    #3楼    琉惗
    2019-08-07 18:24:42
    Chrome 0
    不行啊,在首页调用
  • 农民大伯
    #4楼    农民大伯
    2019-08-07 18:26:25
    Chrome 0
    {module catid=1 more=1 order=updatetime sbpage=1  page=1 pagesize=2 urlrule=index.php?s=bbs&page=[page]}
    存在catid时需要sbpage参数做强制分页
  • 琉惗
    #5楼    琉惗
    2021-04-15 09:23:21
    Chrome 0
    @琉惗:.................................................