Dedecms list pagelist page turning button style how to solve?
Dedecms list pagelist The solution to the homepage and last page style of the page turning button
Recommended learning: 梦Weavercms
Dedecms list The page turning button uses {dede:pagelist listitem="index,end,pre,next,pageno" listsize="10"/}After generating the html, the first page of the list page is
<li >首页</li> <li class="thisclass">1</li> <li><a href='news_2.html'>2</a></li> <li><a href='news_3.html'>3</a></li> <li><a href='news_2.html'>下一页</a></li> <li><a href='news_3.html'>末页</a></li>
the last page It is:
<li><a href='news_1.html'>首页</a></li> <li><a href='news_2.html'>上一页</a></li> <li><a href='news_1.html'>1</a></li> <li><a href='news_2.html'>2</a></li> <li class="thisclass">3</li> <li >末页</li>
The CSS style sheet of the default template:
.dede_pages{ } .dede_pages ul{ float:left; padding:12px 0px 12px 16px; } .dede_pages ul li{ float:left; font-family:Tahoma; line-height:17px; margin-right:6px; border:1px solid #E9E9E9; } .dede_pages ul li a{ float:left; padding:2px 4px 2px; color:#555; display:block; } .dede_pages ul li a:hover{ color:#690; text-decoration:none; padding:2px 4px 2px; } .dede_pages ul li.thisclass, .dede_pages ul li.thisclass a,.pagebox ul li.thisclass a:hover{ background-color:#F8F8F8; padding:2px 4px 2px; font-weight:bold; }
You can see that ".dede_pages ul li a" and ".dede_pages ul li.thisclass" both have padding: 2px 4px 2px; Attribute but ".dede_pages ul li" does not. When ".dede_pages ul li" does not have the padding:2px 4px 2px; attribute, the two buttons
The following will provide two solutions to the above problems
The first method is solved through CSS. This solution is not to control the a tag and only add styles to the li. The code is as follows:
.dede_pages ul{ } .dede_pages ul li{ float:left; height:18px; line-height:18px; padding:4px 10px; margin-right:5px; border:1px #b9cdff solid; } .dede_pages .thisclass{ background:#e3ebfe; }
You can see that the code is very concise, but it is not very good for the user experience. It should be because the current button is displayed by li instead of a, so when the user clicks on the button, it will If you don't click on the text, you don't click on it. For a better user experience we need another solution.
The second method is to modify the dede:pagelist related file arc.listview.class.php in the include folder:
Open arc.listview.class.php and find the following code:
//获得上一页和主页的链接 if($this->PageNo != 1) { $prepage.="<li><a href='".str_replace("{page}",$prepagenum,$tnamerule)."'>上一页</a></li>rn"; $indexpage="<li><a href='".str_replace("{page}",1,$tnamerule)."'>首页</a></li>rn"; } else { $indexpage="<li >首页</li>rn"; } //下一页,未页的链接 if($this->PageNo!=$totalpage && $totalpage>1) { $nextpage.="<li><a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>下一页</a></li>rn"; $endpage="<li><a href='".str_replace("{page}",$totalpage,$tnamerule)."'>末页</a></li>rn"; } else { $endpage="<li >末页</li>rn"; }
Modify $indexpage="
<li class="thisclass">首页</li> <li class="thisclass">1</li> <li><a href='news_2.html'>2</a></li> <li><a href='news_3.html'>3</a></li> <li><a href='news_2.html'>下一页</a></li> <li><a href='news_3.html'>末页</a></li>
The second method is simpler and increases the user experience
PS: Using the second method, there is no need to modify the CSS file.
The above is the detailed content of How to solve the style of page turning button of Dedecms list pagelist. For more information, please follow other related articles on the PHP Chinese website!

dedecms增加多语言的方法:1、进入dedecms后台,创建封面栏目;2、将封面栏目“常规选项”的文件保存目录设置为cn或者en;3、将封面栏目“高级选项”的列表模板设置为“cn_index.htm”或者“en_index.htm”;4、单独调用每种语言的封面栏目和每种语言下的导航栏目即可。

织梦cms是用PHP语言写的。织梦CMS(DedeCMS)是一个PHP开源网站管理系统,作用是构建中小型网站;它采用PHP+MySQL技术开发,可同时使用于windows、linux、unix平台。

dedecms是PHP语言开发的;dedecms中文全称是织梦内容管理系统,是一个PHP开源网站管理系统;dedecms基于PHP和MySQL技术开发,可同时使用于Windows、Linux、Unix平台。

dedecms删除栏目的方法:1、登录后台管理;2、进入“栏目管理”,可以看到当前网站所有栏目;3、选择要删除的栏目;4、将鼠标悬停在栏目名称上,删除栏目;5、点击“确认”按钮以继续删除操作;6、删除成功。

织梦内容管理系统(DedeCMS) 以简单、实用、开源而闻名,是国内最知名的PHP开源网站管理系统,也是使用用户最多的PHP类CMS系统,在经历多年的发展,目前的版本无论在功能,还是在易用性方面,都有了长足的发展和进步。

火车头dedecms出现乱码解决方法:1、检查数据库编码;2、修改dedecms配置文件;3、检查浏览器编码设置;4、清理缓存和临时文件;5、寻求专业帮助。

dedecms是指织梦内容管理系统,是一个PHP开源网站管理系统,用于个人网站或中小型门户的构建;dedecms是基于PHP和MySQL技术开发,可同时使用于Windows、Linux、Unix平台。

dedecms无法修改的解决方法是:1、检查文件夹和文件的读写权限是否正确;2、使用最新版本的DedeCMS,并保持数据库、插件和主题等组件的版本与CMS核心匹配;3、添加了不兼容的插件或主题,导致DedeCMS无法正常工作;4、检查PHP日志和调试信息以找出问题并解决。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 Linux new version
SublimeText3 Linux latest version

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!
