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!