


The method of restricting bytes in the column highlighting special style in Dreamweaver CMS
Currently, currentstyle in the Dream Weaver template only supports dede:channel, which can only call one level of columns. When we build a website, we often need to call the first and second level columns in the navigation bar, and then make the current column higher Bright, use special style, use dede:channelartlist.
The current style of DreamWeaver cannot be used in dede:channelartlist. We need to add some code ourselves.
1. Find the file “/include/taglib/channelartlist.lib.php”; This line of code "$pv->Fields['typeurl'] = GetOneTypeUrlA($typeids[$i]);" 3. Copy the following code after this line of code:
if($typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['id'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['topid'] ){ $pv->Fields['currentstyle'] = $currentstyle ? $currentstyle : ' class="on"';} else{ $pv->Fields['currentstyle'] = '';}
4. Calling method:
{dede:channelartlist typeid='top'}<li{dede:field.currentstyle/}><a href="{dede:field name='typeurl'/}">{dede:field name='typename'/}</a></li>{/dede:channelartlist}
This way you can use currentstyle in the dede:channelartlist tag that calls all columns.
Among them: 3. The class="on" inside is the style added to the current column. You can modify on to what you want.
The above is the detailed content of The method of restricting bytes in the column highlighting special style in Dreamweaver CMS. For more information, please follow other related articles on the PHP Chinese website!

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Notepad++7.3.1
Easy-to-use and free code editor
