Tags:
create new tag
view all tags

SID-02044: Can I add an anchor to every headline?

Status: Answered Answered TWiki version: 5.0.0 Perl version:
Category: CategoryPlugins Server OS: Last update: 10 years ago

I have question regarding a feature for which I though there should be a plugin, but I could not find it. Any pointers are highly appreciated.

I want to add the anchor link for head heading of a wiki page to the heading itself. This would allow me to copy the URL to an anchor while looking at the heading (right click, or just click on it and copy from the URL bar).

Even better would be an integration that I like on GitHub and Markdown documents: when you hover over a heading an anchor symbol appears next to the headline, and the anchor image actually has a href to the heading so I can click on it an copy the direct link from the browser.

Does something like that exist for Twiki?

If not, do you think it can be easily emulated with a template adjustment?

-- Daniel Nüst - 2015-03-26

Discussion and Answer

Sounds like a good idea. AFAIK there is no plugin with this functionality.

FYI, TWiki already adds an anchor to every heading. For example, the h2 "Discussion and Answer" heading has anchor "#Discussion_and_Answer".

Are you a developer? You could write a plugin that adds a copy URL popup on hover over a heading. I'd use the postRenderingHandler to add a hidden div with absolute positioning, that is made visible on hover. See GettingInvolved for intro, TWikiPlugins for docs, and skeleton code SVN:EmptyPlugin/lib/TWiki/Plugins/EmptyPlugin.pm.

-- Peter Thoeny - 2015-03-26

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- Peter Thoeny - 2015-12-03

      Change status to:
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.
SupportForm
Status Answered
Title Can I add an anchor to every headline?
SupportCategory CategoryPlugins
TWiki version 5.0.0
Server OS

Web server

Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2015-12-03 - PeterThoeny
 
  • 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.