r8 - 30 Nov 2006 - 07:18:38 - FranzJosefSilliYou are here: TWiki >  Codev Web > TocUniqueName
Tags:
, create new tag

Generate Unique anchors for TOC purpose

Problem

  1. Two headers with the same name get the same anchor in the TOC (the link from the TOC always points to the first in the row)
  2. Two headers with different names can map to the same anchorname because the name is truncated to 32 characters.

Proposal

Make every anchor that is generated for TOC purposes unique. I changed it locally. Patch attached. Maybe you find it useful and can it be included in the next distribution....

  • patch: patch for mentioned problem

Regards, Ruud

-- RuudGrosmann - 01 Nov 2004

Thanks, this fixes a long outstanding issue mentioned elsewhere.

The affected code is now split up in TWiki.pm and Render.pm. Once detail that needs special attention is that TWiki generates two anchor names, one is for compatibility with older content. The unique topic name number generator needs to account for that. Also, TOC needs to work as expected in composed INCLUDEd docs.

-- PeterThoeny - 04 Nov 2004

 
Topic attachments
I Attachment Action Size Date Who Comment
elseEXT patch manage 3.6 K 01 Nov 2004 - 16:35 RuudGrosmann patch for mentioned problem
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r8 < r7 < r6 < r5 < r4 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo