Page Title Parameters
Numerous inconsistencies have been identified in how page title parameters are handled in Joomla!. One of the goals of this release is to ensure consistency for page titles across all core menu types, for each core template. This work has been completed and is available in the Joomla! 1.5.4 release.
It is always important to test a release before applying it to a production environment. For this release in particular, pay close attention to page titles during testing as there are likely changes you might want to review and possibly adapt.
To understand how consistency has been built into Joomla! for the page title parameters, some background information might be helpful.
There are two places where the page title is displayed. The page title will always appear in the upper left corner of the browser bar and the page title can appear on the actual Joomla! Web page. The same value is always used for the page title whether it prints on the browser bar or the Joomla! Web page.
The page title parameters are set for each menu item in the Parameters (System) section. There are two parameters:
- The Page Title parameter, which is a text field. In this example, the Page Title parameter value contains the legendary "Welcome to the Frontpage" greeting.
- And, the Show Page Title parameter, an option field allowing choices of "Yes" or "No."
Displaying or hiding the page title on the Joomla! Web page
Show Page Title Parameter. The Show Page Title parameter determines whether or not a page title is displayed on the Joomla! Web page. This example demonstrates Show Page Title set to "No." In this case, the "Welcome to the Frontpage" page title is not printed on the Joomla! Web page. Compare this with the first image in this article where Show Page Title is set to "Yes" and the "Welcome to the Frontpage" page title is displayed on the Joomla! Web page.
The page title always appears in the browser bar. When Show Page Title is set to "Yes", Joomla! uses the same page title value for both the browser bar and the Joomla! Web page.
Each Joomla! menu type now implements these principles consistently.
Controlling the value used for page title
There are three rules to determine what value is used for the page title.
Rule 1 - If the Page Title parameter has a value, then that value will be used as the page title.
If you enter a value into the Page Title parameter, then that value is now consistently used as the page title. The examples, above, demonstrate the Page Title parameter value of "Welcome to the Frontpage" correctly used as the page title.
Rule 2 - If no value has been provided for the Page Title parameter and the menu type requires selected content, then the name of that content is used as the page title.
If you do not provide a value for the Page Title parameter, then the value used for page title depends on whether or not the menu item displays selected content. For those menu items where content must be selected, Joomla! uses the name of the content selected as the page title.
For example, if the menu type is an Article Layout, and no value has been provided for the Page Title parameter, then the name of the selected article is used for the page title. The example pictured above highlights this rule for the "Joomla! Overview" article. The same type of logic is used if the menu type is a Category Blog Layout and no value has been provided for Page Title parameter. In that case, the name of the selected Category is used for the page title.
This rule is now consistently applied to all menu types that require specific content, including Articles, Newsfeeds, Polls, Web Links, and so on.
Note: In this example, the Show Page Title parameter is set to "Yes" so the page title value is displayed on both the browser bar and the Joomla! Web page. Setting the Show Page Title to Yes or No will not impact the value used for the page title.
Rule 3 - when no value is provided for the Page Title parameter and the menu type does not require specific content, a specific value associated with the menu type is used as the page title.
When the menu item does not require specific content and there is no Page Title parameter value, the value used as page title depends on the menu type, as listed below:
- Archived Article List - the word "Archives"
- Article Submission - the phrase "Submit an Article"
- Front Page Blog Layout - the site name, as specified in the Global Configuration
- Newsfeeds Category List Layout - the word "Newsfeeds", as pictured above
- Web Links Category List Layout - the phrase "Web Links"
- Web Links Submission - the phrase "Submit a Web Link"
- Search - the word "Search"
- User menu types - text reflective of the purpose of the form, including "Login", "Registration", "Forget your username?", "Forget your password", and "Edit your details"
- Wrapper - the Menu Item Title value
Review and Assistance
To review, here are the basic rules for page titles:
- The page title always displays in the browser title bar.
- The page title can be displayed on the Joomla! Web page if the Show Page Title parameter is set to Yes.
- If the page title displays in both places, the same page title is used in both places.
- The value used for page title is determined using these three rules:
- Rule 1: If a value is entered for the Page Title parameter, that value is used as the page title.
- Rule 2: Otherwise, the name of selected content is used as the page title when the menu item requires specific content.
- Rule 3: Otherwise, a specific word or phrase is used as the page title, depending on the menu type selected.
Consistency with these rules will make it easier to build, maintain, and use Joomla! Web sites. Special thanks to Elin Waring and Ian MacLennan who headed up this task for the Joomla! Bug Squad. A lot of effort went into implementing and testing these changes but it is possible something was overlooked. If you find a situation where these rules are not consistently applied, or if you have questions about the page title changes, please use the Joomla! 1.5 Administration forum.
For more details, see this spreadsheet showing new and old behaviors. For fun, see the blog.