Go to main content

Page title

Contents

Syntax

<txp:page_title />

The page_title tag is a single tag that displays title text depending on the context it is used. Its primary purpose is for outputting information suitable for the HTML <title> tag.

Results appear as follows:

  • Article list: Your site name.
  • Articles by category: Category title | Your site name.
  • Search results page: Search results: Search term | Your site name.
  • Single article page: Article name | Your site name.
  • Comments display: Comments on: Article name.

Page numbers are included in paginated pages (e.g. search results extending to >1 page).

Attributes

Tag will accept the following attributes (case-sensitive) as well as the global attributes :

separator="character(s)"
The character sequence you want between each piece of information.
Default: | (a pipe).

Examples

Example 1: Show page titles with custom separator

<title>
    <txp:page_title separator=" &raquo; " />
</title>

Genealogy

Version 4.7.0

separator attribute changed to a pipe (was colon).

If you notice any kind of problem with this page's construction or content (outdated information, typos, broken links, or whatever), open an issue to have it sorted. Or have a go at it yourself. :)