Home >CMS Tutorial >PHPCMS >How to determine whether it is the home page in phpcms

How to determine whether it is the home page in phpcms

尚
Original
2020-01-13 17:29:492678browse

How to determine whether it is the home page in phpcms

Many times, if statements need to be used in the template to determine whether it is the homepage, so as to set the homepage and non-homepage codes.

In Phpcms V9, what is the code to determine whether it is the home page?

The specific code for Phpcms V9 to determine whether it is the homepage is:

{if !$catid}我是首页{/if}

The basis for judgment is: The $catid variable on the homepage is empty, so judging whether it has a value can determine whether it is the homepage.

PHP Chinese website, a large number of free PHPCMS tutorials, welcome to learn online!

The above is the detailed content of How to determine whether it is the home page in phpcms. 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