Smarty's simplest way to achieve odd-even color change in lists_PHP tutorial

WBOY
Release: 2016-07-13 09:47:42
Original
718 people have browsed it

Smarty’s simplest way to achieve odd-even color change in a list

This article describes the simplest way to achieve odd-even color change in Smarty. Share it with everyone for your reference. The details are as follows:

I recently encountered a problem in the process of changing templates: changing the color of every other row on the list page. I originally wanted to use a program to achieve it, but I found a very convenient method in the smarty template on the Internet. I would like to share it:

{/section}

{/section}

1

2

3

4

5

{section name=cat loop=$list}

{$list[cat].id}
1

2 3

45
{section name=cat loop=$list}
{$list[cat].id}
I hope this article will be helpful to everyone’s smarty template program design.
http://www.bkjia.com/PHPjc/1025337.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1025337.htmlTechArticleSmarty’s simplest way to achieve odd-even discoloration of lists. This article describes the simplest method of Smarty to achieve odd-even discoloration of lists. Share it with everyone for your reference. The details are as follows: Recently I have been changing...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template