帝国cms内容页如何调用内容简介

帝国CMS内容页如何调用内容简介呢?今天发现内容页模板优化不够好,所以想要进行优化一下,想要调用description为内容简介,其实很是简单,直接用[!–smalltext–]获取就行了。

附上内容页模板代码,代码截止于2015年1月9号版本。

优化页面设置很重要,这样设置就完全达到了优化的效果:

<meta name=”keywords” content=”[!–pagekey–]” />
<meta name=”description” content=”[!–smalltext–]” />

效果如下:

 

<!DOCTYPE html>
<head>
<meta charset=”gb2312″>
<meta http-equiv=”X-UA-Compatible” content=”IE=11,IE=10,IE=9,IE=8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0″>
<meta name=”apple-mobile-web-app-title” content=”<?=$public_r[sitename]?>”>
<meta http-equiv=”Cache-Control” content=”no-transform” />
<meta http-equiv=”Cache-Control” content=”no-siteapp” />
<title>[!–pagetitle–]_[!–class.name–]_<?=$public_r[sitename]?></title>
<link rel=’stylesheet’ id=’main-css’  href='[!–news.url–]skin/xiu/css/style.css’ type=’text/css’ media=’all’ />
<link rel=’canonical’ href='[!–pagetitle–]’ />
<meta name=”keywords” content=”[!–pagekey–]” />
<meta name=”description” content=”[!–smalltext–]” />
<!–[if lt IE 9]><script src=”[!–news.url–]skin/xiu/js/html5.js”></script><![endif]–>
</head>
<body>
<section class=”container”>
  [!–temp.header–]
  <div class=”content-wrap”>
    <div class=”content”>
      <header class=”article-header”>
        <h1 class=”article-title”><a href=”[!–titleurl–]”>[!–title–]</a></h1>
        <ul class=”article-meta”>
          <li>
                   发布时间:[!–newstime–]    
          </li>
          <li><?
if($navinfor[‘writer’]==””) {
echo ”;
}
else{
echo ‘<span>作者:’.$navinfor[writer].'</span>’;
}
?>
         </li>
          <li>   来源:
                  <?
if($navinfor[‘befrom’]==””) {
echo ‘仿站网;
}
else{
echo ”.$navinfor[befrom].”;
}
?> 
          </li>
          <li>分类:<a href=”[!–class.url–]” title=”查看[!–class.name–]中的全部文章” rel=”category tag”>[!–class.name–]</a></li>
          <li class=”post-views”>阅读(<script src=[!–news.url–]e/public/ViewClick/?classid=[!–classid–]&id=[!–id–]&addclick=1></script>)</li>
          <li><a href=”#pinglun” title=”去发表你的看法”>评论</a></li>
          <li></li>
        </ul>
      </header>

内容简介:[!–smalltext–]
      <article class=”article-content”>[!–newstext–]</article>
      <div class=”article-social”> 
      
[e:loop={‘selfinfo’,1,0,0,’id<‘.$navinfor[id].”,’id desc’}]
上一篇:<a href=”<?php
echo $bqsr[titleurl];
$pre=’true’;
?>”><?=esub($bqr[title],35)?></a>
[/e:loop]
<?php
if(empty($pre)){
echo “上一篇:很抱歉没有了”;
}
?>

 &nbsp;&nbsp;&nbsp;&nbsp;          
[e:loop={‘selfinfo’,1,0,0,’id>’.$navinfor[id].”,’id asc’}]
下一篇:<a href=”<?php
echo $bqsr[titleurl];
$next=’true’;
?>”><?=esub($bqr[title],35)?>
</a>
[/e:loop]
<?php
if(empty($next)){
echo “下一篇:很抱歉没有了”;
}
?>

        <div class=”action-popover”>
          <div class=”popover top in”>
            <div class=”arrow”></div>
            <div class=”popover-content”><a class=”bds_qzone” data-cmd=”qzone”></a><a class=”bds_tsina” data-cmd=”tsina”></a><a class=”bds_weixin” data-cmd=”weixin”></a><a class=”bds_tqq” data-cmd=”tqq”></a><a class=”bds_sqq” data-cmd=”sqq”></a><a class=”bds_renren” data-cmd=”renren”></a></div>
          </div>
        </div>
        </span> </div>
           <div class=”article-tags”><div class=”bdsharebuttonbox”><a href=”#” class=”bds_more” data-cmd=”more”></a><a href=”#” class=”bds_qzone” data-cmd=”qzone” title=”分享到QQ空间”></a><a href=”#” class=”bds_tsina” data-cmd=”tsina” title=”分享到新浪微博”></a><a href=”#” class=”bds_tqq” data-cmd=”tqq” title=”分享到腾讯微博”></a><a href=”#” class=”bds_renren” data-cmd=”renren” title=”分享到人人网”></a><a href=”#” class=”bds_weixin” data-cmd=”weixin” title=”分享到微信”></a></div>
<script>window._bd_share_config={“common”:{“bdSnsKey”:{},”bdText”:””,”bdMini”:”2″,”bdMiniList”:false,”bdPic”:””,”bdStyle”:”1″,”bdSize”:”24″},”share”:{}};with(document)0[(getElementsByTagName(‘head’)[0]||body).appendChild(createElement(‘script’)).src=’http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=’+~(-new Date()/36e5)];</script></div>
       
       
       
      <div class=”relates”>
        <h3 class=”title”><strong>相关阅读</strong></h3>
        
                  <div id=”hm_t_48712″></div>
        
      </div>
      <h3 class=”title” id=”pinglun”></h3>
      [!–temp.pl–]
    </div>
  </div>
  [!–temp.sidebar–]  
  [!–temp.footer–]
  <div class=”rollto”><a href=”javascript:;”></a></div>
</section>
<script type=’text/javascript’ src='[!–news.url–]skin/xiu/js/jquery.js?ver=1.0.1′></script> 
<script type=’text/javascript’ src='[!–news.url–]skin/xiu/js/bootstrap.js?ver=1.0.1′></script> 
<script type=’text/javascript’ src='[!–news.url–]skin/xiu/js/custom.js?ver=1.0.1′></script>
</body>
</html>