Home > CMS Tutorial > DEDECMS > body text

How to use the DedeCMS [field:highlight/] tag

藏色散人
Release: 2019-12-07 09:41:25
Original
1944 people have browsed it

How to use the DedeCMS [field:highlight/] tag

How to use the DedeCMS [field:highlight/] tag?

When we are making the Tag tag template You will encounter the [field:highlight/] tag

{dede:tag row='60' sort='new'}
 <a href=&#39;[field:link/]&#39; class=&#39;tagc[field:highlight /]&#39;>[field:tag /]</a>
 {/dede:tag}
Copy after login

This is the random style of the tag

The official v5.7 version only released 2 styles, now we can change it to any style

Step one: First find \templets\default\style\page.css

Find line 905 .tagc1

Add your own style at the end such as: .tagc2 .tagc3 .tagc4...etc. style/(note to continuous increment)

Step 2: Find include\taglib\tag.lib.php

Line 99:

$row[&#39;highlight&#39;] = mt_rand(1,2);
Copy after login

If you add .tagc10 in the style, then change it to:

$row[&#39;highlight&#39;] = mt_rand(1,10);
Copy after login

Save, the test is successful

The above is the detailed content of How to use the DedeCMS [field:highlight/] tag. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!