Home >CMS Tutorial >DEDECMS >How to use the DedeCMS [field:highlight/] tag

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

藏色散人
藏色散人Original
2019-12-07 09:41:252050browse

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}

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);

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

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

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!

Statement:
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