Tags:
create new tag
, view all tags

Question

Is there any way to automatically generate the name a target header when creating a link to that header?

For example, I have a page, named MyPage, that contains a heading, named "Target Link.' In another page, I need to create a wiki-word link to 'Target Link' and display the topic name as the link. It appears that the only way to do this is to create a forced link:

[[Mypage#Target_Link][Target Link]]

However, if I change the name of the 'Target Link' header, I have to update all of the links I've created to it.

So here's my question: Is there a way to create a static anchor to a header and thereafter automatically generate the name of the header in the links to that header? For example, it would be great to have a variable that does this, like:

[[Mypage#Target_Link][%AutoHeader%]]

So, if I change the name of the 'Target Link' header to 'My Head,' the anchor is still valid and all of the link names are updated to 'My Head.'

Environment

TWiki version: TWikiRelease04Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Missing functionality

-- GordonFurbush - 05 Jan 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

This seems to be related to MakeAnchorVariable.

-- PankajPant - 05 Jan 2006

What about creating a named anchor manually so that you don't have to rely on the name that is automatically created by TML headlines.

#TargetLink

or

<a name="non-wikiword target link"></a>

-- MichaelDaum - 07 Mar 2006

 
Topic revision: r5 - 2006-03-07 - MichaelDaum
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, 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.