需求:

相关class类名:S224_on_point

url:/notification/list

url:/notification/list?type=2

thymeleaf代码如下:

<div th:classappend="${(param.isEmpty() ? 'S224_on_point ' : '') + 'S224_message_kind pageChange'}" th:attr="data-page=@{/notification/list}">全部消息</div>
<div th:classappend="${(#strings.equals(#request.getParameter('type'),'1') ? 'S224_on_point ' : '') + 'S224_message_kind pageChange'}" th:attr="data-page=@{/notification/list(type=1)}">平台动态</div>
<div th:classappend="${(#strings.equals(#request.getParameter('type'),'2') ? 'S224_on_point ' : '') + 'S224_message_kind pageChange'}" th:attr="data-page=@{/notification/list(type=2)}">产品消息</div>
<div th:classappend="${(#strings.equals(#request.getParameter('type'),'3') ? 'S224_on_point ' : '') + 'S224_message_kind pageChange'}" th:attr="data-page=@{/notification/list(type=3)}">财务消息</div>
<div th:classappend="${(#strings.equals(#request.getParameter('type'),'4') ? 'S224_on_point ' : '') + 'S224_message_kind pageChange'}" th:attr="data-page=@{/notification/list(type=4)}">用量消息</div>

thymeleaf中${param.xx}返回的是数组,这一点和jstl不一样,所以此次使用#request.getParameter('type')

thymeleaf中分类信息使用不同的样式的更多相关文章

  1. 大数据学习day20-----spark03-----RDD编程实战案例(1 计算订单分类成交金额,2 将订单信息关联分类信息,并将这些数据存入Hbase中,3 使用Spark读取日志文件,根据Ip地址,查询地址对应的位置信息

    1 RDD编程实战案例一 数据样例 字段说明: 其中cid中1代表手机,2代表家具,3代表服装 1.1 计算订单分类成交金额 需求:在给定的订单数据,根据订单的分类ID进行聚合,然后管理订单分类名称, ...

  2. (二十五)后台开发-分类信息的curd -展示所有实现

    案例1-分类信息的curd 步骤分析: 左边的dtree: 1.导入dtree.js 2.导入dtree.css 3.创建一个div 添加样式 class="dtree" 4.在d ...

  3. 织梦CMS首页调用分类信息栏目及列表方法

    不懂代码,搜索学习一晚上,都是说调用特定栏目分类信息列表的,用这个代码 {dede:arclistsg row='10' titlelen='24' orderby='pubdate' channel ...

  4. [转载]织梦CMS首页调用分类信息栏目及列表方法

    原文地址:织梦CMS首页调用分类信息栏目及列表方法作者:小武哥 不懂代码,搜索学习一晚上,都是说调用特定栏目分类信息列表的,用这个代码 {dede:arclistsg row='10' titlele ...

  5. WordPress 获取指定分类ID的分类信息

    get_term:直接从数据库中获取分类信息get_the_category:使用post_id作为参数,先根据post_id查询对应的文章然后再返回对应的分类信息,如果没有文章信息则返回Null 之 ...

  6. (二十八)分类信息的curd-分类信息删除

    删除分类步骤分析: 1.在list.jsp上编写 删除连接 /store/adminCategory?method=delete&cid=?? 2.在delete方法中 获取cid 调用ser ...

  7. (二十七)分类信息的curd-分类信息修改

      修改分类步骤分析: 1.在list.jsp页面上点击修改(编辑) /store/adminCategory?method=getById&cid=??? 2.在getById方法中 获取c ...

  8. (二十六)分类信息的curd-分类信息添加

    分类信息添加: 1.应在在左边的dtree上添加连接(展示所有的分类信息) d.add(...,"/store/adminCategory?method=findAll",&quo ...

  9. 结合redis缓存的方式,查询和展示分类信息

    package cn.itcast.travel.service.impl;import cn.itcast.travel.dao.CategoryDao;import cn.itcast.trave ...

随机推荐

  1. P2341 [HAOI2006]受欢迎的牛[SCC缩点]

    题目描述 每头奶牛都梦想成为牛棚里的明星.被所有奶牛喜欢的奶牛就是一头明星奶牛.所有奶 牛都是自恋狂,每头奶牛总是喜欢自己的.奶牛之间的"喜欢"是可以传递的--如果A喜 欢B,B喜 ...

  2. master-worker常驻型程序代码修改哪些需要重启master或者worker

    之前在yii的项目里用redis作为消息队列,现在很多任务需要延迟需求,于是把之前redis的消息队列替换成了rabbitmq 于是使用yii的yii2-queue这个组件 但是由于提供的yii qu ...

  3. Ubuntu增加swap交换空间的步骤

    1.首先用命令free查看系统内 Swap 分区大小. free -m total used free shared buffers cached Mem: 2012 1960 51 0 748 95 ...

  4. CentOS7.x安装nodejs-10.16.3

    Wiki.js 安装 需要用到nodejs,本文介绍下快速安装nodejs 环境: 操作系统:CentOS7.6 nodejs版本:10.16.3 官网:https://nodejs.org/en/ ...

  5. linux 安装MySql 5.7.20 操作步骤【亲测】

    一. #卸载系统自带的Mariadb[root@master ~]# rpm -qa|grep mariadbmariadb-libs-5.5.44-2.el7.centos.x86_64[root@ ...

  6. UVALive-7040-Color(容斥原理)

    链接: https://vjudge.net/problem/UVALive-7040 题意: Recently, Mr. Big recieved n owers from his fans. He ...

  7. [Angular] Show a Loading Indicator for Lazy Routes in Angular

    We can easily code split and lazy load a route in Angular. However when the user then clicks that la ...

  8. 二十五 存储技术与应用 iSCSI技术应用 、 udev配置 NFS网络文件系统 、 Multipath多路径 、 NFS网络文件系统 、 udev配置

    1.配置iSCSI服务 服务器上要额外配置一块硬盘 服务端(proxy)安装target,并将新加的硬盘配置为iSCSI 的共享磁盘 在客户端(client)上安装initiator,挂载服务器iSC ...

  9. MVC4 Application Install

    For VS2010 http://www.asp.net/mvc/mvc4 For VS2012 http://www.asp.net/downloads

  10. 将Eclipse,MyEclipse等编辑器的项目管理框颜色改为护眼豆沙绿的方法

    转载链接:https://blog.csdn.net/caibaoH/article/details/77005977