help:dtext#dtext-links mentions the format:
wiki #1234 Link to wiki
But it works only with numbers, not letters: wiki #zzz
And anyways the [[zzz]] format seems to do the exact same intended thing.
Posted under Bugs & Features
help:dtext#dtext-links mentions the format:
wiki #1234 Link to wiki
But it works only with numbers, not letters: wiki #zzz
And anyways the [[zzz]] format seems to do the exact same intended thing.
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 type | What you get | Notes |
---|---|---|
[[Kantai Collection]] | Kantai Collection | Link 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.
If you go to History or Wiki History, it'll say it in the address bar. For example, History on wiki #29999 links to /wiki_page_versions?search[wiki_page_id]=29999.
You can also get the "id" in the JSON response from the API: /wiki_pages.json?search[title]=1girl
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).