Custom Links Module

Last modified: August 27, 2009 - 21:52

This tutorial shows an example use of the Custom Links Module. As the name suggests, Custom Links provides the user an ability to create customized links. Once installed, you can go to admin/build/custom_links to start adding the custom links.

To follow this tutorial, you will need to install http://drupal.org/project/views , token module http://drupal.org/project/token and custom links module http://drupal.org/project/custom_links .

We will be creating a link at the bottom of each node which will take us to all the nodes posted by the node author.

http://drupal.org/node/561598

To start off, create a new View with name as "author_posts" and view type "node".

http://drupal.org/node/561600

On the next screen "Add Display" of type "Page" and make "Row Style" to Node , Add Arguments of type "User:Name" and set page path to "author_posts" as shown in the figure below

http://drupal.org/node/561602

Save the View and go to Custom Links Administration (admin/build/custom_links) and click on "Add a custom link" . Put anything which you will be able to remember in "Link Key", in the Title field type "View Author's Other Posts", in the Path field type the full path to the View we setup in the previous steps (e.g. http://example.com/author_posts) and add the token placeholder at the end of the path of the View

So now your Path field value should look like this http://example.com/author_posts/[author-name] . We are using [author-name] since in the View we setup we used user:name as an argument.

Choose the node type that you want the custom links applied and save the custom link. Now visit the node type that you placed your custom links and you will be able to see a link at the bottom of the node which will look like the one shown in Figure 1.

If you have any problems following the instructions look at the figure below.

http://drupal.org/node/561604

 
 

Drupal is a registered trademark of Dries Buytaert.