维护之前的一个客户网站,使用的是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;}

sd_cms置顶新闻,背景颜色突击显示的更多相关文章

  1. div没有设置高度时背景颜色不显示(浮动)

    在使用div+css进行网页布局时,如果外部div有背景颜色或者边框,而不设置其高度,在IE浏览器下显示正常.但是使用Firefox/opera浏览时却出现最外层Div的背景颜色和边框不起作用的问题. ...

  2. [置顶] css 背景透明,文字不透明,alpha滤镜,opacity,position:relative;

    都知道,在alpha滤镜下,背景透明了,里面的文字也会跟随透明,我们可以设置内容的position为relative可以解决这个问题 但是在position为absolute这么做却没有效果,怎么解决 ...

  3. [置顶] echarts x轴文字显示不全(xAxis文字倾斜比较全面的3种做法值得推荐)

    echarts x轴标签文字过多导致显示不全 如图: 解决办法1:xAxis.axisLabel 属性 axisLabel的类型是object ,主要作用是:坐标轴刻度标签的相关设置.(当然yAxis ...

  4. [置顶] Android中使用Movie显示gif动态图

    转载请注明:  http://blog.csdn.net/u012975705/article/details/48717391 在看这篇博文之前对attr自定义属性还是不是很熟的童鞋可以先看看:An ...

  5. ckeditor5字体颜色,字体背景颜色设置显示

    在config.js中添加相关代码: config.allowedContent=true;//关闭标签过滤, config.colorButton_enableAutomatic = true; c ...

  6. div背景图片或颜色不显示的解决办法

    背景图片不显示的原因: 1. css没有被调用 2. css图片地址不对 3. div的高度没有固定,是auto.没有设值或者高度不够 4. div被嵌套 5. div代码不规范 解决办法: (1)D ...

  7. Silverlight DataGrid数据行背景颜色控制

    sdk:DataGrid数据绑定后,部分特殊的行需要用不同的背景颜色来显示.(注册DataGrid的LoadingRow事件) private void radGridView_LoadingRow( ...

  8. 019 [工具软件]窗体置顶 DeskPins

    DeskPins:Windows下将任何窗体置顶的工具 官方主页:https://efotinis.neocities.org/deskpins/index.html 官方下载的是一个exe安装包,用 ...

  9. wordpress调用置顶文章sticky_posts的三种方法

    有时我们在开发wordpress时需要调用置顶文章sticky_posts,怎么调用呢?几种写法,有用到query_post的,有用到WP_Query,也有用到is_sticky(),下面随ytkah ...

随机推荐

  1. linux shell mysql 数据库主从同步状态检查告警

    需求: 1.监测数据库主从状态 2.获取数据库主要参数 3.可读取配置文件 4.部署位置自适应.   参考资料: http://blog.csdn.net/yf210yf/article/detail ...

  2. ORA-12154: TNS:could not resolve the connect identifier specified

    场景: .Net程序无法连接到数据库 现象: 2015/8/26 11:02:03 ORA-12154: TNS:could not resolve the connect identifier sp ...

  3. PHP安装所最到的问题-解决方案

    Although Drupals 7+ run smoothly on PHP 5.3, Drupal 6 still feels much better with PHP 5.2. Even tho ...

  4. 自动 点击切换 按钮切换 轮播无缝选项卡 ----原生js

    <!doctype html> <html> <head> <meta charset="utf-8"> <meta name ...

  5. android.view.WindowLeaked

    08-30 13:17:05.645 25543-25543/com.tongyan.nanjing.subway E/WindowManager: android.view.WindowLeaked ...

  6. jquery 文本域光标操作(选、添、删、取)

    一.JQuery扩展 ; (function ($) { /* * 文本域光标操作(选.添.删.取)的jQuery扩展 http://www.cnblogs.com/phpyangbo/p/55286 ...

  7. Spring container vs SpringMVC container(webmvc container)

    Difference between applicationContext.xml and spring-servlet.xml in Spring Framework Scenario 1 In c ...

  8. 透视校正插值(Perspective-Correct Interpolation)

    在渲染器光栅化每个三角形的过程中,需要对根据顶点属性对三角形进行扫描线插值.此时由于投影面上顶点的2D坐标与顶点属性不成线性关系,因此是不能简单地使用线性插值来计算顶点属性的. 此时应当利用透视校正插 ...

  9. 不同hadoop集群之间迁移hive数据

    #!/bin/bash #set -x DB=$1 #获取hive表定义 ret=$(hive -e 'use ${DB};show tables;'|grep -v _es|grep -v _hb| ...

  10. POS管理系统之新增设备入库

    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"% ...