Danbooru

dtext "wiki #" + letters

Posted under Bugs & Features

Musaran said:

And anyways the [[zzz]] format seems to do the exact same intended thing.

Yes, that’s why it’s mentionald above “Links” under “Basic formatting”:

What you typeWhat you getNotes
[[Kantai Collection]]Kantai CollectionLink to a wiki

I’m not sure why you had to post about this.

The wiki # links are for linking to the actual wiki page record, which has a constant unchanging ID number associated with it (the part that goes after the #). This is useful since the name of a wiki can change, meaning using a bracketed wiki link [[ ]] may no longer work at some point in the future. Additionally, sometimes wiki page records get deleted/renamed, then another wiki page record gets renamed to the same as that first record. Either of these can make locating items of interest, such as the revision history of a particular tag, difficult to track down.

The easiest way to get the ID programmatically if you're using Javascript is to get it from the <body> element. This can easily be seen by opening up the dev console (F12), entering document.body.dataset.wikiPageId at the command prompt, then pressing enter.

Another way is by checking out the edit link, or going to the edit page, since it currently uses the ID variant of the URL (for now).

1