


How to set up the arclist loop of Dedecms to determine the first li, then add fixed css, otherwise not add it?
How to set up the arclist loop of dedecms to determine the first li, then add fixed css, otherwise not add it?
This article mainly introduces the arclist loop of Dedecms. If it is judged to be the first li, then add fixed css, otherwise do not add it. It has certain reference value. If you are interested, Friends, you can refer to
Recommended learning: 梦Weavercms
In the arclist loop of dedecms, determine if it is the first li, then add fixed css, Otherwise,
is not added. After testing, the same applies to the channel tag.
Writing is as follows:
The code is as follows:
{dede:arclist row=4 flag='p'} <li [field:global name=autoindex runphp="yes"](@me==1)? @me="class=on":@me=""; [/field:global]>[field:global.autoindex/]</li>{/dede:arclist} [field:global name=autoindex runphp="yes"](@me==1)? @me="class=on":@me="";[/field:global]
The meaning of this sentence is that if the loop is the first one, add class=on, otherwise it is empty .
Note: There are two equal signs in the red part.
Attached channel judgment case
{dede:channel type='son' typeid='3'} <li [field:global name=autoindex runphp="yes"](@me==0)? @me="class='pro_lb on'":@me="class='pro_lb'";[/field:global]>[field:typename/]</li> {/dede:channel}
The above is the detailed content of How to set up the arclist loop of Dedecms to determine the first li, then add fixed css, otherwise not add it?. 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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

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

SublimeText3 English version
Recommended: Win version, supports code prompts!

WebStorm Mac version
Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Zend Studio 13.0.1
Powerful PHP integrated development environment