phpcms之文章列表页

Posted l979662050

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了phpcms之文章列表页相关的知识,希望对你有一定的参考价值。

  位置:

<div class="breadcrumb">您的位置: <a itemprop="breadcrumb" href="{siteurl($siteid)}">首页</a> ? <span class="current">{catpos($catid)}列表</span></div>

文章:

{pc:content action="lists" catid="$catid" num="5" order="id DESC " page="$page" moreinfo="1"}
        {loop $data $r}
        <!--article start-->
        <article class="article"> 
       {php $h_md=pc_base::load_model(‘hits_model‘);$get_db=$h_md->get_one(array(‘hitsid‘=>"c-".$modelid."-".$r[id]));$views=$get_db[views];}
      <!--views start-->
      <div class="views"><em> {$views} </em><span>次数</span></div>
      
      <!--<span class="glyphicon glyphicon-eye-open" aria-hidden="true">  </span>-->
      <!--views end--> 
      
      <!--postentry start-->
      <div class="postentry"> 
          
        <!--article_thum start-->
        <div class="article_thum">
                    <a href="{$r[url]}" title="{$r[title]}" target="_blank">                        
                        <img src="{$r[thumb]}" alt="{$r[title]}">
                    </a>
                </div>
        <!--article_thum start-->
        
        <!--article_body start-->
        <div class="article_body">
            
            <!--listtitle start-->
          <h2 class="listtitle"><a href="{$r[url]}" target="_blank" title="#" rel="bookmark"{title_style($r[style])}>{$r[title]} </a></h1>
          <!--listtitle end--> 
          
          <!--listmeta start-->
          <div class="listmeta">
              <span class="glyphicon glyphicon-time" aria-hidden="true"></span> {date(‘Y-m-d‘,$r[inputtime])}           &nbsp; 
              &nbsp; <span class="glyphicon glyphicon-user" aria-hidden="true"></span> 文章来源:<a href="#"></a> 
          </div>
          <!--listmeta end--> 
          
          <!--listdes start-->
          <p class="listdes">{$r[‘description‘]}</p>
          <!--listdes end--> 
          

        </div>
        <!--article_body end-->
       
      </div>
      <!--postentry end--> 
      
    </article>
        <!--article end-->
        {/loop}
        {/pc}

分页:

{$pages}

右侧栏:

{pc:content action="hits" catid="$catid" num="5" order="monthviews DESC"}
        {loop $data $r} 
        <li>
             <span class="hots_img">
                    <a href="{$r[url]}" target="_blank"><img src="{$r[thumb]}" class="img-responsive" alt="{$r[title]}"></a>
                 </span>
                <span class="hots_title"><a href="{$r[url]}" target="_blank">{$r[title]}</a></span>
                <span class="hots_views">
                {php $h_md=pc_base::load_model(‘hits_model‘);$get_db=$h_md->get_one(array(‘hitsid‘=>"c-".$modelid."-".$r[id]));$views=$get_db[views];}
                <span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>{$views}
                </span>
        </li>
        {/loop}
        {/pc}

 

以上是关于phpcms之文章列表页的主要内容,如果未能解决你的问题,请参考以下文章

phpcms之文章详情页

如何在phpcms文章列表页如何获取其它ID

Phpcms v9 实现首页|列表页|内容页调用点击量的代码

phpcms v9栏目生成静态

phpcms替换类列表页,内容页,主页

Ajax实现phpcms列表分页效果