Using the link node filter module
Often when you create a “Privacy Policy” or “Terms and Conditions” page you may have to link to another page within your drupal site. This can be a pain because you have to remember the full URL and you also have to know how to enter in HTML code. With the link node filter you can easily link to another node by entering:
[node:node_id,title="val2"]
Example:
[node:25,title="Privacy Policy"]
This will output:
Privacy Policy
Before we get started go to http://drupal.org/project/link_node and download the module and place it in sites/all/modules.
Then enable at Administer >> Site building >> Modules.
Configure filter
Go to Administer >> Site configuration >> Input formats and click on configure. Scroll down to the Filters section and tick Link Node Filter and then click on Save configuration at the bottom of the page.

Once again click configure and then click on the Configure tab.

Scroll down to the Link Node codes.

If you are linking to a page node you want to specify the title eg: "[node:node_id,title="val2"]" you must enter title to the Allowed parameters for page nodes.

To test it out go to any node and enter in "[node:node_id,title="test page"]" in the body field and make sure the node_id is a page content type.

If you are having any problems please leave a comment.
Comments
Also, try Freelinking module
The Freelinking module implements an input filter that provides much the same functionality; you can use double square brackets to enclose a link, and set the output link text (and alternate text for the link, as well, I believe). It works with internal and external links.
I think Freelinking sounds easier than what is described above, since it doesn't require you to know the node number, and it seems as if this solution does.
It would be nice if these two projects would merge somehow, so we just had one good canonical way to do this. Preferably in core or very close to it, as easy, friendly linking was a core feature of older CMSes than Drupal.
Thanks for that i'll look
Thanks for that i'll look into it.
I think Freelinking sounds
I think Freelinking sounds easier than what is described above, since it doesn't
require you to know the node number, and it seems as if this solution does.
On my sites at least, titles of nodes are sometimes changed but the node IDs typically never do. Freelinking is less easy to use because of this.
Add new comment