Tags:
create new tag
view all tags

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 History Action Size Date Who Comment
Unknown file formatext patch r1 manage 3.6 K 2004-11-01 - 16:35 UnknownUser patch for mentioned problem
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2006-11-30 - FranzJosefSilli
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.