Home > Article > CMS Tutorial > 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='[field:link/]' class='tagc[field:highlight /]'>[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['highlight'] = mt_rand(1,2);
If you add .tagc10 in the style, then change it to:
$row['highlight'] = 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!