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:

<a href="/privacy_policy">Privacy Policy</a>

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.

fig_1_link_node.png

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

fig_2_link_node.png

Scroll down to the Link Node codes.

fig_3_link_node.png

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.

fig_4_link_node.png

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.

fig_5_link_node.png

If you are having any problems please leave a comment.