Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

How do I link to a node on this site by number?

by SiteDocClan
on Jun 10, 2000 at 01:36 UTC ( #17441=sitefaqlet: print w/ replies, xml ) Need Help??

To link to a node by ID, use the syntax [id://nnnnn].

For example, if you write [id://131], you'll get The Monastery Gates, and if you write [id://131|PerlMonks], you'll get PerlMonks. Both link to the same place, node 131.

Finding the ID number of a node

If someone created a link to a node using its ID number, as described above, then the URL will contain the number, and you can use that number yourself if you want to make your own link to that node.

If, however, you only know the title of the node, then finding its ID number is a little more involved. The easiest way is to actually go to the node (follow a link to it, or type the title in the Search box) and get the ID of the node from its page. The ID of each node can usually be found near the top, just under the title. For example, on the page you are now viewing, you should see #17441 up above, just below How do I link to a node on this site by number?

If linking to nodes by ID is something you'll want to do a lot, then you may find it convenient to have each node's ID displayed in your browser's title bar. You can do this through a user setting. To do this:
Edit your Display Settings and set the Custom Node Title Definition to include %N (to show the node ID). You'll probably want this to show the node's Title as well, so include %T in the setting too.

To retrieve the ID of a node programmatically, you can use one of our XML generators to get the metadata of a node, including its ID and title. For example, you can get the info of this page with the
URL ?node_id=37150;xmlstyle=flat;nodes=17441, which returns XML like

<?xml version="1.0" encoding="ISO-8859-1"?> <info site="" sitename="PerlMonks">Rendered by th +e Node query XML Generator <node node_id="17441" author_user="17342" createtime="20000609213640" +lastupdate="" nodetype="sitefaqlet" author_name="SiteDocClan">How do +I link to a node on this site by number?</node> </info>

For those who have enabled their Free Nodelet: You can add codes there which show you the current node's ID. Help for Free Nodelet Settings.

See Also:

What shortcuts can I use for linking to other information?

Especially, read and heed these important shortcut usage tips!

Back to the PerlMonks FAQ
Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2014-08-30 20:59 GMT
Find Nodes?
    Voting Booth?

    The best computer themed movie is:

    Results (293 votes), past polls