Home> CMS Tutorial> PHPCMS> body text

What does the PHPCMS num parameter mean?

Guanhui
Release: 2020-06-01 14:05:22
Original
2694 people have browsed it

What does the PHPCMS num parameter mean?

PHPCMS What does the num parameter mean?

In the PHPCMS V9 system, the num parameter in the PC tag supports custom data. You can specify the number of pages when calling in a loop. Compared with other CMS, this is more free. , humane, you can also use the num parameter to display various lists.

Usage example

{pc:content action="lists" catid="67" order="listorder DESC" num="2" thumb="1"} {loop $data$r} {php $num++} 
  • ·{$r['title']} {/loop}{/pc}
  • Copy after login

    Actually, this code is the home page calling method in the default template of phpcms. I just modified it slightly to determine the css style.

    In addition {if $num%2==0} can also use the list page to make horizontal lines or other things appear "every few lines", for example:

    The code is as follows:

    {if$n%5==0}
  • {/if}
  • Copy after login

    This code means that every 5 lines, a horizontal li tag appears.

    Recommended tutorial: "PHPCMS Tutorial"

    The above is the detailed content of What does the PHPCMS num parameter mean?. For more information, please follow other related articles on the PHP Chinese website!

    Related labels:
    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
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!