[pmwiki-users] WikiTitle

Hans design5 at softflow.co.uk
Thu Mar 3 17:20:09 CST 2011

Thursday, March 3, 2011, 8:40:51 PM, kjettil wrote:

> I always use my own skins, with only $WikiTitle and $Title in the 
> <title> tag. For $WikiTitle I use a word or a set of words that overall
> describe the contents of the site in terms that may be useful for search
> engines. Equally, I select with (:title:) a $Title for each page that 
> relates to the contents of that page.

Thank you, that sounds reasonable.
One problem I noticed with this is that if  a page has
a (:notitle:) directive, the title (as page name)
still appears in the <title> tag.

To suppress injection of that I had to extend the (:notitle:) Markup
function in my skin, using a new variable $HTMLTitle in the template:


and adding to skin.php:

global $HTMLTitle, $WikiTitle;
$HTMLTitle = $WikiTitle.' - '.PageVar($pagename, '$Title');

## Markup (:notitle:)
function NoTitle2($pagename) {
  global  $HTMLTitle, $WikiTitle;
  SetTmplDisplay('PageTitleFmt', 0);
  $HTMLTitle = $WikiTitle;

Then it appears to work well.


More information about the pmwiki-users mailing list