Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: TOCs and deeplinks for our house rules

by kcott (Bishop)
on Nov 01, 2017 at 05:46 UTC ( #1202494=note: print w/replies, xml ) Need Help??


in reply to TOCs and deeplinks for our house rules

G'day Lanx,

The idea of being able to use fragment identifiers is a good one.

Some pages have them but they're not easy to find. For instance, I can link to the section of "What shortcuts can I use for linking to other information?" which explains how to use fragment identifiers with this type of markup: [href://?node_id=43037#general|General-Purpose Linking Shortcuts] (which renders as General-Purpose Linking Shortcuts); however, you need to know that the identifiers exist on that particular page and then you have to find them. I generally use the "Inspect Element" browser tool menu option for this; another (less than optimal) method would be to search the page's source HTML code.

Many other pages don't have such identifiers, so a first step would be to add them.

A TOC would one way to handle this: I can certainly see benefits to doing this. When I've found what I'm looking for in a page, having an indication of the identifier at that point would be better than having to scroll back to the top to see what the TOC links to. I've seen this type of thing done with unobtrusive link text consisting of a single symbol character: § and seem to be used quite a lot; I've seen others, many with various types of arrow symbols; I don't really have a preference.

I also think the syntax for such links needs to be made more obvious — it's virtually a hidden feature at present. As I'm writing this, I see a link for "What shortcuts can I use for linking to other information?" almost at the bottom of the page. Following that link, I then need to scroll down five screenfuls (on my 27' monitor) to find the information. Searching that page for "fragment" or "identifier" finds no matches; searching for "href:" finds it but, if you knew to search for that, you probably didn't need to (i.e. you already know the syntax).

— Ken

Replies are listed 'Best First'.
Re^2: TOCs and deeplinks for our house rules
by LanX (Archbishop) on Nov 02, 2017 at 23:19 UTC
    G'day kcott,

    > I also think the syntax for such links needs to be made more obvious

    I agree, but first things first!

    For the beginning now I wrote a script which generates a TOC.

    (FWIW I wrote a nodelet-hack which automatically translates literal URLs to the monastery to appropriate markup.)

    I think the monastery should also consider automatically translating self referential text to the meant markup:

    So

    http://perlmonks.org/?node_id=1202656#Textual_content:

    would become

    Re^2: TOCs and deeplinks for our house rules#Textual content:

    [href://?node_id=1202656#Textual_content:|Re^2: TOCs and deeplinks for our house rules#Textual content:]

    > having an indication of the identifier at that point would be better than having to scroll back to the top to see what the TOC links to.

    What I did now is transforming the headings to links to the original TOC entry.

    Like this you only need two clicks to get the URL in the address bar and navigating to the TOC becomes trivial:

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1202494]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2019-11-15 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (80 votes). Check out past polls.

    Notices?