PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

请问,要想使置顶,推荐,最新同时显示在导航中,代码该怎么改?... [复制链接]

1#
以下是只能实现信息置顶的代码,如果要想同时实现置顶,最新和推荐,代码该怎么改?谢谢!
<style>
.hh_article{clear:both;} /*文章带置顶样式*/
.hh_article li .tw{text-align:left;border:1px dotted #cccccc;border-width:0 0 1px 0;padding:5px 0 5px 0;overflow:hidden;} /*置顶通用样式*/
.hh_article .tw .pic{float:left;margin:5px 10px 5px 0;border:1px solid #dddddd;display:inline}
.hh_article .tw .title{text-align:left;line-height:15px;}
.hh_article .tw .title a{font-weight:bold;padding-left:10px;font-size:12px;color: #cc0000}
.hh_article .tw .date{float:right;color:black;padding-right:2px;font-size:10px;}

.hh_article .tw .introduct{padding:2px 5px 5px 0px;line-height:20px;color: #666666;}
.hh_article .tw .pixc{float:right;width:15px;height:15px;border:1px solid #000}
.hh_article li.normal{clear:both;height:20px;line-height:15px;text-align:left;overflow:hidden;}
.hh_article .normal .title{float:left;text-align:left;padding:0 0 0 10px;background:url(images/article_arrow.gif) no-repeat left center;}
.hh_article .normal .date{float:right;color:black;padding-right:2px}
</style>




<div class="hh_article">
<ul>
<%
string pic="/e/images/diy/zd.gif",istop="0";
DataTable dt;
DataRow dr;
dt=Get_Data();
for(int i=0;i<dt.Rows.Count;i++)
{
dr=dt.Rows;

istop=dr["istop"].ToString();
%>
<%if(istop=="1"){%>
<li class="tw">
<span class="title"><a href="<%=Detail_Url(dr)%>" target="<%=Target%>" title="<%=Server.HtmlEncode(dr["title"].ToString())%>" <%=newcolor((DateTime)dr["thedate"])%>> <%=SubStr(dr["title"].ToString(),Title_Num,true)%></a> </span> <a href=""><img src="<%=pic%>" class="pixc"></a>  <span class="date"><%=((DateTime)dr["thedate"]).ToString("yyyy-MM-dd")%><%=newpic((DateTime)dr["thedate"])%>
</span> </li>
<%}
else
{%>
<li class="normal"><span class="title">
<a href="<%=Detail_Url(dr)%>" target="<%=Target%>" title="<%=Server.HtmlEncode(dr["title"].ToString())%>" style="<%=dr["title"]%>"><%=SubStr(dr["title"].ToString(),Title_Num,true)%></a></span>
<span class="date"><%=((DateTime)dr["thedate"]).ToString("yyyy-MM-dd")%></span>
<span class="clear"></span>
</li>
<%
}
}
%>
</ul></div>
分享 转发
TOP
2#

我是说,让最新信息,置顶信息,推荐信息同时突出显示,也可任选一种显示,该怎么做,谢谢!
TOP
3#

只改这部分吗?那不是都显示相同的标志了?其它部分也得改吧,如:最新该显示 最新的图标,置顶显示置顶的图标
TOP
发新话题 回复该主题