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 Action Size Date Who Comment
Unknown file formatEXT patch manage 3.6 K 2004-11-01 - 16:35 RuudGrosmann patch for mentioned problem
Topic revision: r8 - 2006-11-30 - FranzJosefSilli
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by PerlIdeas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.