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 someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is 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

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2006-03-07 - MichaelDaum
 
  • 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.