sd_cms置顶新闻,背景颜色突击显示
2014-04-11 14:21
127 查看
维护之前的一个客户网站,使用的是sd_cms系统,因为好久没有维护了,看到这网站的时候,真不敢相信,自己也曾做出过这样的网站。
客户要求置顶新闻始终在最上面,有背景颜色突击显示。
找到对应的代码,修改如下:
{sdcms:loop field="id,title,classid,ClassUrl,htmlname,ontop" table="View_info" top="7" where="(classid=3 or classid=4 or classid=13 or classid=14 or classid=15 or classid=21) and ispass=1" order="ontop desc, adddate desc"}
<li [if {ontop}=1]class="ontop"[end if]>· <a href="{link}" title="{title}" target="_blank">{title len="40"}</a></li>
{/sdcms:loop}
主要就是在fileld里面加上ontop,order里面加上ontop desc,并放在前面,下面的li里面加上[if {ontop}=1]class="ontop"[end if]
css为.ontop {background-color:#eff5fb !important;}
客户要求置顶新闻始终在最上面,有背景颜色突击显示。
找到对应的代码,修改如下:
{sdcms:loop field="id,title,classid,ClassUrl,htmlname,ontop" table="View_info" top="7" where="(classid=3 or classid=4 or classid=13 or classid=14 or classid=15 or classid=21) and ispass=1" order="ontop desc, adddate desc"}
<li [if {ontop}=1]class="ontop"[end if]>· <a href="{link}" title="{title}" target="_blank">{title len="40"}</a></li>
{/sdcms:loop}
主要就是在fileld里面加上ontop,order里面加上ontop desc,并放在前面,下面的li里面加上[if {ontop}=1]class="ontop"[end if]
css为.ontop {background-color:#eff5fb !important;}
相关文章推荐
- CSS 背景图片和背景颜色融合,以及多张背景图片融合显示
- 鼠标经过显示边框与背景颜色效果
- [置顶] MarkDown设置字体颜色和背景颜色
- android--设置TextView部分文字的颜色和背景(高亮显示)
- MyEclipse提示键配置、提示快捷键、提示背景色、关键字颜色、代码显示、编辑框背景色等
- SpannableString与SpannableStringBuilder(把字符串转换成图片等,字符串在textview 等控件显示不同的颜色,背景样式的方法)
- jQuery 行背景颜色的交替显示(隔行变色)实现代码
- iOS 点击cell改变背景颜色或者图片&&cell中其他部分取消高亮显示
- android--设置TextView部分文字的颜色和背景(高亮显示)
- MyEclipse提示键配置、提示快捷键、提示背景色、关键字颜色、代码显示
- Qt:关于自定义widget显示不出背景颜色的问题
- [置顶] 将富文本转化为纯文字,新闻更多,只显示一部分新闻详情的时候使用
- android--设置TextView部分文字的颜色和背景(高亮显示)
- div+css div不设置高度背景颜色或外边框不能显示的解决方法
- CRM的dev(一)之EasyUI条件设置行背景颜色红色显示:
- div+css总结—FF下div不设置高度背景颜色或外边框不能显示的解决方法
- MyEclipse提示键配置、提示快捷键、提示背景色、关键字颜色、代码显示、编辑框背景色等
- 改变Mac终端(Terminal)背景及命令的显示颜色
- [原创]微软BI专题-一种动态显示Matrix中Total背景颜色的方法
- Flex中如何通过设置GridLines对象的horizontalAlternateFill样式交错显示LineSeries图表背景颜色的例子