aspcms新闻显示在网站首页代码
我有一个代码,栏目有新闻这个栏目,但是网站首页没有新闻栏目,不利于优化,我想在网站首页显示新闻栏目里的内容,哪位大神有这样的代码,求指教!我的主页代码是<head><me...
我有一个代码,栏目有新闻这个栏目,但是网站首页没有新闻栏目,不利于优化,我想在网站首页显示新闻栏目里的内容,哪位大神有这样的代码,求指教!
我的主页代码是
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{aspcms:sitetitle}{aspcms:additiontitle}</title>
<meta name="Keywords" content="{aspcms:sitekeywords}" >
<meta name="Description" content="{aspcms:sitedesc}" >
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/css/style.css" rel="stylesheet" type="text/css">
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/css/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/css/index.js" type="text/javascript"></script>
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/css/jquery.SuperSlide.2.1.1.js" type="text/javascript"></script>
<!--[if IE 6]>
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/css/DD_belatedPNG.js"></script>
<script>
DD_belatedPNG.fix('img,div,a');
</script>
<![endif]-->
</head>
<body>
<!--head-->
{aspcms:top}
<!--banner-->
<div class="banner">
<div id="slideBox" class="slideBox">
<div class="hd">
<ul>{aspcms:slidelist}<li></li>{/aspcms:slidelist}</ul>
</div>
<div class="bd">
<ul>
{aspcms:slidelist}
<li><a><img src="[slidelist:pic]" alt="" text=""/></a></li>
{/aspcms:slidelist}
</ul>
</div>
</div>
</div>
<script id="jsID" type="text/javascript">
var ary = location.href.split("&");
jQuery(".slideBox").slide({mainCell:".bd ul",effect:"fold",autoPlay:true,interTime:5000});
</script>
<!--floor-1-->
<div class="pro-type">
<ul class="clearfix">
{aspcms:content sort=5 num=3 order=order}
<li>
<a href="[content:link]">
<img src="[content:pic]" />
<div class="p">
<div class="title">[content:title]</div>
<p>[content:P_jianjie]</p>
<p>[content:P_jiage]</p>
</div>
</a>
</li>
{/aspcms:content}
</ul>
</div>
<!--foot-->
{aspcms:foot}
</body>
</html> 展开
我的主页代码是
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{aspcms:sitetitle}{aspcms:additiontitle}</title>
<meta name="Keywords" content="{aspcms:sitekeywords}" >
<meta name="Description" content="{aspcms:sitedesc}" >
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/css/style.css" rel="stylesheet" type="text/css">
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/css/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/css/index.js" type="text/javascript"></script>
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/css/jquery.SuperSlide.2.1.1.js" type="text/javascript"></script>
<!--[if IE 6]>
<script src="{aspcms:sitepath}/Templates/{aspcms:defaulttemplate}/css/DD_belatedPNG.js"></script>
<script>
DD_belatedPNG.fix('img,div,a');
</script>
<![endif]-->
</head>
<body>
<!--head-->
{aspcms:top}
<!--banner-->
<div class="banner">
<div id="slideBox" class="slideBox">
<div class="hd">
<ul>{aspcms:slidelist}<li></li>{/aspcms:slidelist}</ul>
</div>
<div class="bd">
<ul>
{aspcms:slidelist}
<li><a><img src="[slidelist:pic]" alt="" text=""/></a></li>
{/aspcms:slidelist}
</ul>
</div>
</div>
</div>
<script id="jsID" type="text/javascript">
var ary = location.href.split("&");
jQuery(".slideBox").slide({mainCell:".bd ul",effect:"fold",autoPlay:true,interTime:5000});
</script>
<!--floor-1-->
<div class="pro-type">
<ul class="clearfix">
{aspcms:content sort=5 num=3 order=order}
<li>
<a href="[content:link]">
<img src="[content:pic]" />
<div class="p">
<div class="title">[content:title]</div>
<p>[content:P_jianjie]</p>
<p>[content:P_jiage]</p>
</div>
</a>
</li>
{/aspcms:content}
</ul>
</div>
<!--foot-->
{aspcms:foot}
</body>
</html> 展开
1个回答
展开全部
{aspcms:content sort=5 num=3 order=order}
<li>
<a href="[content:link]">
<img src="[content:pic]" />
<div class="p">
<div class="title">[content:title]</div>
<p>[content:P_jianjie]</p>
<p>[content:P_jiage]</p>
</div>
</a>
</li>
{/aspcms:content}
这里把“sort=5”中的5改成您要显示的新闻 id就可以
<li>
<a href="[content:link]">
<img src="[content:pic]" />
<div class="p">
<div class="title">[content:title]</div>
<p>[content:P_jianjie]</p>
<p>[content:P_jiage]</p>
</div>
</a>
</li>
{/aspcms:content}
这里把“sort=5”中的5改成您要显示的新闻 id就可以
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询