MetInfo shownews文章内容
来自站长百科
导航:返回上一页
典型shownews文章内容文件代码及相关说明如下所示:
<!--<?php
require_once template('head');
$methits=methtml_hits('news'); //内容页面点击次数显示函数调用
$metnewslist=methtml_news('text','all','','','','1','0','1','1','1','0','1','1','8'); //调用最新8条当前栏目相关文章
$methtml_prenextinfo=methtml_prenextinfo(); //上一条下一条显示函数调用
echo <<<EOT
-->
<div class="web">
<div class="webleft">
<div class="nav_x"> <a href='$index_url'>{$lang_home}</a> > $nav_x[name]</div>
<div class="content"> <h1>$news[title]</h1> //文章标题
<div class="content">$news[content]</div> //文章详细内容
<div class="hits">$methits</div> //点击次数标签显示
<div class="prenext">$methtml_prenextinfo</div> //上一条下一条标签显示
<div class="news_other">{$lang_Article}</div>
<div class="news_list">$metnewslist</div> //相关文章列表
</div>
</div>
<!--
EOT;
require_once template('rightlist');
echo <<<EOT
-->
</div>
<!--
EOT;
require_once template('foot');
?>
制作要点
- 文章标题建议使用H1控制,以便SEO优化;
- 点击次数及上一条下一条建议直接使用系统自带标签,以便正确显示;