Home > CMS Tutorial > Empire CMS > body text

Two ways to determine whether to output the subtitle or the original title using Empire CMS in one move

silencement
Release: 2019-11-29 13:18:35
forward
1963 people have browsed it

Two ways to determine whether to output the subtitle or the original title using Empire CMS in one move

Many times, for the sake of interface or publicity effect, the title of the article page or other pages needs to be changed. At this time, it is necessary to use the subtitle as the title. The powerful empire cms must also have a subtitle. There is a subtitle field in sub-pages such as article pages and column pages.

However, in most cases, there is no need to use subtitles. If we set the subtitles one by one, it would be a waste of precious time. At this time, we considered how to set the subtitles as When empty, the output displays the original title.

Recommended to study "Empire cms tutorial"

Most of the online searches found only one way to output and display the original title when the subtitle is empty, which is to use it in the page body The code is as follows:

The code is as follows:

<?=$bqr[ftitle]?$bqr[ftitle]:$bqr[title]?>
Copy after login

It should be noted that this code needs to be used in smart tags, so it can basically only be used in Chinese Appears. If you want to display the title in the title tag, it is not possible. After testing, the following code can output and display the original title when the subtitle is empty in the title tag:

The code is as follows:

<title><?php echo $navinfor[&#39;ftitle&#39;]?$navinfor[&#39;ftitle&#39;]:$navinfor[&#39;title&#39;] ?>_[!--class.name--]</title>
Copy after login

The above is the detailed content of Two ways to determine whether to output the subtitle or the original title using Empire CMS in one move. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:www.word666.com
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!