I have followed the instructions in this post [ http://ddblock.myalbums.biz/node/851 ] to link the "Read More" button to an external URL. I would also like to link the pager item to an external URL instead of to its own slide. Here is a description:

So if I have a dblock with four slides:
Topic A
Topic B
Topic C
Topic D

Right now if I know I want to read more on Topic D, I have to either wait for the topic D slide to come around and then click the "Read More," or I have to click the Topic D Pager Item, which will bring up the Topic D slide, upon which I can click the read more button.

What I want is for the Topic D Pager Item to also link to the external URL of the topic D slide, rather than linking to the topic D slide itself.

By the way, I believe I'm using the custom theme highlight-50I if it matters.

Does this make sense? How would I do this?

Comments

TonyV’s picture

I have posted this brief video to describe what I am hoping to accomplish. Thanks for any help.

http://www.promethius.com/pcu/ddblock/ddblock.html

ppblaauw’s picture

Status: Active » Postponed (maintainer needs more info)

In short you would need to adjust the link for the pager.

In the pager preprocess function add the pager_link variable:

// add pager_link variable
if (isset($result->node_data_field_pager_item_text_field_url_value)) {
  $pager_items[$key1]['pager_link'] =  check_plain($result->node_data_field_pager_item_text_field_url_value);
}

In the pager-content.tpl.php file

adjust the line:

<a href="#" title="navigate to topic" class="pager-link"><?php print $pager_item['image']; ?><?php print   $pager_item['text']; ?></a>

To

<a href="<?php print $pager_item['pager_link']; ?>" title="navigate to topic" class="pager"><?php print $pager_item['image']; ?><?php print $pager_item['text']; ?></a>

Change the href and change the pager class (the cycle plugin uses class="pager-link")

Hope this helps you further, please let me know.

TonyV’s picture

Thanks very much for the feedback. I'll try implementing this shortly and report back.

blingximus’s picture

Priority: Normal » Major

Hi, I know this is an old issue but I have use for this feature.

I tried the above mentioned code but I failed to see any change on my site.

I would love to have some assistance with this. I am in need of urgent help.

Thanks

Craig

shippin’s picture

Status: Postponed (maintainer needs more info) » Active

Hello,
I'm as well trying to implement this fix to make pager-text linkable.

I didn't understand how do I set up a custom link for each news item after applying the changes to the code you suggested above?

ppblaauw’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

#5
Download and enable the link module: http://drupal.org/project/link
Add a field of type link to the content type for the slideshow.
Add the field to the view for the slideshow.

Hope this helps you further, please let me know.