Hyperlinking to parts of an outline
Not logged in

Links like anatomy#heart jump to the anatomy outline and search for heart. Links like #heart will search for "heart" in the current outline starting from where the link is.


Discussion that sparked the functionality:

john wrote: many outliners support hyperlinks to other parts of the outline. I used that feature in the old days in an outliner called 'grandview', and it could sometimes be useful. - I'm interested in hearing how this works.

Brian wrote: Could you explain at Hyperlinking to parts of an outline?

John wrote: Typically, the goes to the destination location, clicks a menu for "copy link destination" then goes to the place where the link should be inserted, and clicks a menu for "paste link". Then, a link icon appears, or else a 'name this link' popup appears, and clicking on that link text brings the user to that destination.

Another way to do hyperlinks in an application is highlight the text that you want to be the destination, click on 'make link destination' and that text becomes marked in some way (perhaps italic, or red), but internally is essentially an HTML anchor tag. Then, when at the place where you want to make a link, you click an 'insert link' and a list of link targets appears, one is picked, and the text that was highlighted as the anchor tag text appears, underlined in blue, like a URL.

I'd suggest the 2nd way, since it's very html-ish, so will convert to HTML easily, and also avoids the issue of 'where has the link target moved to?' if the link target text gets moved around.

Brian wrote: This is very instructive. Thank you. I definitely like the second way better.


07Dec02 - Brian: Another idea I have is similar to the 2nd one above, except it doesn't involve explicitly making link destinations. Instead, an internal outline link can be created that when clicked will be just like doing a search. So creating an internal link could be thought of as creating a stored search. The disadvantage of this compared with number 2 above is that there won't be a list of link targets to choose from. However, I should be able to code it so the user gets feedback as they are typing the link whether the search will match anything or not

I'm thinking I could piggyback on the interoutline linking syntax with this. The special character # as the first character of the link will indicate that it is just a stored search. So text like #heart in an outline, when clicked, will search for heart.

Eventually I could expand this to support linking to a specific part of another outline. For example, the text anatomy#heart will open the outline named anatomy and then search for heart.

06Apr2005 - LVirden: So, the search that takes place - what happens if the text appears multiple times - as I would assume it might in an anatomy outline? Is there some way to specifically indicate an anchor name?

Brian: There is no way to specify an anchor name. The times that I've used this "stored search" and there are multiple matches, I change all the matches into links. That way I can click from one to the next and to the next. If you really want a single place to be an anchor point for a search that frequently occurs, you could prepend the occurrence you want to be the main anchor with some symbol. For heart, if there was one main place you want to be the anchor point, then change the 'heart' text to '@heart' and in the link use #@heart. Any way you could think of to make the anchor text unique would work.