Current Location: Home> Latest Articles> Guide to Customizing Website Title in EmpireCMS

Guide to Customizing Website Title in EmpireCMS

M66 2025-07-13

How to Customize Website Title in EmpireCMS

When building a website using EmpireCMS, many administrators encounter the issue of modifying the website title. The default title format might not meet individual needs, so it is necessary to customize the website title. In this article, we will provide detailed code examples to help you modify the EmpireCMS title and enhance your website's user experience and SEO effectiveness.

How to Modify the Website Title in EmpireCMS

First, log in to the EmpireCMS backend management system, go to the "Website Settings" page, find "Basic Settings", and then modify the "Website Name" option. By default, the website title is displayed in the format "{$webname} - {$description}". If you need a more personalized title, you can refer to the following code examples for modification.

Code Example 1: Modify Website Title Based on Category ID

{if $article.Category.Id==1}

Home - {</code><code class="php variable">$webname</code><code class="php plain">}

{/if}

{if $article.Category.Id==2}

About Us - {</code><code class="php variable">$webname</code><code class="php plain">}

{/if}

{if $article.Category.Id==3}

Product Center - {</code><code class="php variable">$webname</code><code class="php plain">}

{/if}

This code example allows you to modify the website title based on the category ID of the current page, providing different titles for different pages.

Code Example 2: Set Website Title Based on Page Name

{assign var='currentPage' value=$arctitle}

{if $currentPage eq 'Home'}

Homepage - {</code><code class="php variable">$webname</code><code class="php plain">}

{elseif $currentPage eq 'About Us'}

About Us - {</code><code class="php variable">$webname</code><code class="php plain">}

{elseif $currentPage eq 'Product Center'}

Product Center - {</code><code class="php variable">$webname</code><code class="php plain">}

{else}

Unnamed Page - {</code><code class="php variable">$webname</code><code class="php plain">}

{/if}

This example shows how to set a specific title for each page, ensuring that the website title matches the page name for a better user experience and improved SEO.

Conclusion

With the two code examples above, you can easily customize the website title in EmpireCMS. Based on your page requirements, you can choose the method that best suits your needs for personalized title settings. We hope these solutions help you manage and optimize your EmpireCMS website's title.