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

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

silencement
silencementforward
2019-11-29 13:18:352023browse

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]?>

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>

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!

Statement:
This article is reproduced at:www.word666.com. If there is any infringement, please contact admin@php.cn delete