Reputation: 399
I have created a theme in liferay 6.1. Now my question is how do I change the title of the theme pages. For ex: About us page has title "Aboutus -liferay", I want to change it to "Aboutus".
I have tried using javascript for this like: document.title="aboutus";
But until the page loads it shows the default title(Aboutus-liferay) and then after page load this "aboutus" title appears.
I want the custom title. Any help is highly appreciated.
Upvotes: 3
Views: 2453
Reputation: 399
I just added:
**<head>
<title>$the_title</title>
</head>**
in my portal_normal.vm file and this solved my problem. Now whatever title i add in my html title of the pages in Manage Pages --> pages gets displayed in the title.
Upvotes: 2
Reputation: 2555
In portal_normal.vm
, which is a velocity file, add your title to the following code snippet :
<head>
<title>your_title</title>
</head>
EDIT
If you are talking about JSP pages, you can use:
com.liferay.portal.util.PortalUtil.setPageTitle(String, title, HttpServletRequest request);
in the respective page body.
Upvotes: 0