码迷,mamicode.com
首页 > Web开发 > 详细

phpcms之文章详情页

时间:2018-01-25 13:06:22      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:nbsp   item   view   null   内容   action   delay   path   div   

位置:

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

文章信息:

<h1 class="text-left">{$title}</h1>
                <div class="article-meta">
                    <span class="glyphicon glyphicon-time" aria-hidden="true"></span>{$inputtime}
                    <span class="glyphicon glyphicon-user" aria-hidden="true"></span>{$copyfrom}                    
                    <span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>分类:<a href="#" rel="category tag"></a>
                    <span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>阅读:<span id="hits"><script language="JavaScript" src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script>次</span>
                </div>

内容:

{$content}

上下一篇:

<div class="col-sm-6 col-xs-12"><span class="glyphicon glyphicon-menu-left" aria-hidden="true"></span><strong>上一篇</strong><br /><a href="{$previous_page[url]}" rel="prev">{$previous_page[title]}</a></div>
                <div class="col-sm-6 col-xs-12"><strong>下一篇<span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span></strong><br /><a href="{$next_page[url]}" rel="next">{$next_page[title]}</a></div>
            

其他文章:

{pc:content action="hits" catid="$catid" num="3" order="monthviews DESC" cache="3600"}
         {if $data}
        <div class="related wow fadeInUp" data-wow-delay="0.5s">
            <h2 class="widget_title">他们还看的文章</h2>
            <!--related_box start-->
            <div class="related_box row">
            {loop $data $r}
                <div class="col-md-4 col-sm-4">
                    <!--related_body start-->
                    <div class="related_body">
                        <a href="#" class="related_thum">
                        {if $r[‘thumb‘] == null}
                            
                        {else}
                        <img src="{$r[thumb]}" class="img-responsive" title="{$r[title]}" alt="{$r[title]}">
                        {/if}
                        </a>
                        <div class="related-title">
                            <a href="{$r[url]}" title="{$r[title]}">{$r[title]}</a>
                        </div>
                    </div>
                    <!--related_body end-->
                </div>
            {/loop}
            </div>
            <!--related_box end-->        
        </div>
        {/if}
        {/pc}

右边栏:

{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之文章详情页

标签:nbsp   item   view   null   内容   action   delay   path   div   

原文地址:https://www.cnblogs.com/l979662050/p/8350602.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!