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 的实用相关接口,函数,调用方法

PHPCMS 概念初学

简单介绍phpcms以及phpcms如何安装?