[pmwiki-users] WikiTitle
Maxim
maxim at smspower.org
Sat Mar 5 16:46:09 CST 2011
> what is your preferred way to use the HTML <title> tag?
I have it wiki-driven. In Site/TitleTag:
(:if name {$DefaultName}:)(:else:){$Titlespaced} - (:ifend:)(:if group
{$DefaultGroup}:)(:else:){$Group} - (:ifend:)SMS Power!
Then, in config.php (should be in skin.php really...):
function TitleTag($pagename)
{
$page = ReadPage('Site.TitleTag', READPAGE_CURRENT);
echo trim(strip_tags(MarkupToHTML($pagename, $page['text'])));
}
Then, in my skin:
<title><!--function:TitleTag--></title>
It's not very efficient, and the wiki part should be more complex to
suit all cases, but it does the trick for me. I find it vastly
preferable to move the logic into a wiki page rather than be editing
PHP whenever I decide to tweak it.
Maxim
More information about the pmwiki-users
mailing list