... create a cross-reference to another page

Under:

Creating a cross reference

Reference to another page is done through a special syntax you have to embed in your HTML code. This tag is of the form [node:XXX] or [node:XXX, title="Alternate Title"]. It will automatically be converted into links.
For example

[node:802, title="this link"]

will give this link while
 

[node:802]


will give Software & Computing.

This extension works only within normal HTML text flow that is, it will not be replaced nor substituted within HTML code blocks. Note that the link refers to the URL page location of node 802 (the Software and Computing page).

 

Advanced notes

  • <a href="?q=node/366">This link</a> would refer to this page itself i.e. this link. You would lose the associated path convenience but it is one way to cross reference a page to itself within a self-formed HREF (for example, if you need to use #name tags). This form should be used in a seldom manner as since Drupal 5.x, all HREF and NAME references are working as one would expect (in other words, don't use it - we mention it in case you __really__ need it).
  • This the parser will automatically convert tags like [node:XXX, title="Alternate Title"] into links, how to write them literally if need be? You will need to disable the RICH Text Editor and go in Plain Text Editor mode and use the <code></code> HTML tag to prevent the conversion of quotes into &amp;.

 

Why using references of the form [node:XXX] ??

At each new page creation, Drupal adds a "node" reference to that new page. This number is unique and will never be used again in the lifetime of your Drupal installation. This means that as far as you refer to the node and the page has not been deleted, the reference will always be correct even if the page is placed at a different location as per the URL path.

For example, if node 802 is in /STAR/comp/ but later moves to /comp/, using a reference <A HREF="/STAR/comp/">this link<A> instead of

[node:802, title="this link"]

will lead to creating a non-dynamically adaptable pages and the link may be broken. Using Drupal's node syntax however will always (and regardless of where the page is as per its URL reference) lead to the right cross-reference.