search
HomeCMS TutorialDEDECMSThe 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 method of restricting bytes in the column highlighting special style in Dreamweaver CMS

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=&#39;top&#39;}<li{dede:field.currentstyle/}><a href="{dede:field name=&#39;typeurl&#39;/}">{dede:field name=&#39;typename&#39;/}</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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor