01543: Bookmark name

Summary: Bookmark name
Created: 2026-03-19 20:38
Status: Closed, added
Category: Website
From: gnuzoo
Assigned:
Priority: 5
Version: Current
OS: any

Description: When I go to the main PmWiki website at https://www.pmwiki.org/
and drag the URL to my toolbar, the resulting bookmark name is set
to "PmWiki | PmWiki / PmWiki". Why is it not set to just "PmWiki"?
I did not set the pagename or the group name.

It gets it from the HTML title element - but since it is at the
root URL it should be titled just "PmWiki"

It does the same with "PmWiki | PmWiki / Download".
I think it should be just "PmWiki / Download"

Why do should I have to edit the bookmark and change it manually? Can that be fixed?

gnuzoo

Added, the HTML title tag it will now show the page title, then the group name if not part of the page title, then the wiki title ("PmWiki") if not in the page title or group name. So in your examples, "PmWiki" and "Download - PmWiki", and another one "Index de la documentation - PmWikiFr". Petko

For reference, here is the code in config.php. Petko

function DedupHTMLTitle($pagename) { # PITS:01543
  global $HTMLTitleFmt, $WikiTitle;
  $title = PageVar($pagename, '$Title');
  $htf = ['{$Title}'];
  $group = PageVar($pagename, '$Group');
  if(strpos($title, $group) === false) $htf[] = '{$Group}';
  if(strpos("$title - $group", $WikiTitle) === false) $htf[] = '{$WikiTitle}';
  $HTMLTitleFmt = implode(' - ', $htf) . ' $ActionTitle';
}
$PostConfig['DedupHTMLTitle'] = 5;