How to link Read more... button to another page instead of the node


  • This "How to" tutorial assumes you have the advanced dynamic display block slideshow working, but you want to link the "Read more..." button to another page instead of the node.
  • Links refer to the existing tutorial on this site

Important Notes

  • This tutorial is for of the Dynamic Display Block module version 1.x. Please upgrade to the latest recommended version.
  • Please post only comments with corrections regarding the documentation. We aim to quickly move corrections into the documentation.
  • Before making comments, please search the issue queue. Search on all issues.
  • When you have issues, support request or comments, the preferred place to post them is in the issue queue of the project. The issue queue of the project is monitored daily.
  • Support requests, bug reports, and off-topic comments will be deleted without warning.


  1. Add URL field to the content type you use for the slideshow
  2. Add URL field to the view you use for the slideshow
  3. Add link to the nodes you use for the slideshow
  4. Change preprocess function

possible URL's
The value in the URL field could be a relative URL from the page you are on, relative from Drupal root or an absolute URL.

  • e.g. node/1, relative to the home page
  • e.g /node/1, relative from drupal root
  • e.g., absolute URL

Detailed instructions

Add URL field to content type

Path to add new field to the Content type News item:

  1. Go to Admin > Content types > News item.

Add Url field

  1. Click the Manage field link of the News item content type under Operation.
  2. Fill in the following text field to add new fields for News item content type:
    1. Label - e.g (Url)
    2. Field name - e.g (url)
    3. Type of the data to store - choose from the select box option Text.
    4. Form element to edit the data - choose Textfield from the select box option Textfield.
    5. Click Save button.

Note: When you have the Content Permissions sub-module of CCK enabled, make sure you give permissions for this field.

Configure Url field:

  1. Size of textfield - required, e.g (30 change the default size of the textfield).
  2. Help text textarea - (optional).
  3. Required checkbox - (optional).
  4. Leave the other default settings.
  5. Click Save field settings button.

Arrange CCK fields

Drag an drop the new URL field after the Pager item text field.

Add URL field to views

Path to add views field:

  1. Go to Admin > Site building > Views >.

Add URL field

  1. Under the list of views, find view: news_items and click the Edit link tab.
  2. Click News item slideshow at the left side of the page under Default tab.
  3. Click + sign button in the Fields fieldset.
  4. Select Content in the select box options Groups and check Content: Url - (field_url).
  5. Click Add button.
  6. Configure field Content: Url - (field_url), select Plain text under Format select box option and leave the other default settings.
  7. Click Update button.
  8. Click Save button.

Arrange View fields

Drag Content: Url - (field_url) Plain text and drop after the Pager item text field.

Add links in the URL field of the nodes you already made

You can now add a link in the Url textfield where the read more.. button has to link to. E.g (

Change preprocess function
To make the Read more... button link to another page you need to change the code of the [theme_name]_preprocess_ddblock_cycle_block_content preprocess function in your template.php file.


// add slide_read_more variable and slide_node variable
if (isset($result->nid)) {
  $slider_items[$key1]['slide_read_more'] =  l('Read more...', 'node/' . $result->nid);

Change to:

// add slide_read_more variable and slide_node variable
if (isset($result->node_data_field_pager_item_text_field_url_value)) {
  $slider_items[$key1]['slide_read_more'] =  l('Read more...', $result->node_data_field_pager_item_text_field_url_value);

or change to the following if not all links have to link to other pages.

// add slide_read_more variable and slide_node variable
if (isset($result->node_data_field_pager_item_text_field_url_value)) {
  $slider_items[$key1]['slide_read_more'] =  l('Read more...', $result->node_data_field_pager_item_text_field_url_value);
elseif (isset($result->nid)) {
  $slider_items[$key1]['slide_read_more'] =  l('Read more...', 'node/' . $result->nid);

When you want e.g. use a named anchor in the link have a look at: Use named anchor in link of read more button in the Precprocess snippets section.

When you click the "read more" and it does not go to the page but just the next slide is shown, have a look at the faq question: When I click on the read more button it doesn't go to the node itself but it just goes to the next slide. Why?

Using other field names

If you use another field name instead of Url, uncomment the drupal_set_message debug lines at the top of the two preprocess function.

[theme_name]_preprocess_ddblock_cycle_block_content and [theme_name]_preprocess_ddblock_cycle_pager_content.

You will now see the result of the drupal_set_message lines, which shows the view_name and the view_fields of your view. You can use this for changing the view_name and the view_field names in the preprocess functions in the template.php file

For more information on how to change the template.php file, see Preprocess functions.

Note: After you have changed the view_name and field_names comment the drupal set_message line again.