hi,
great modul, thanks for your efforts:
is it possible to change the behaviour of the pager so that it changes the slide on mouseover and on click (on the pager) it goes to the node?
i rewrote the pager-thumbnail output like this in views:
<a href="node/[nid]" class="page-link">[field_news_thumb_fid_1]</a>
this looks ok on the views-preview, but ddblock-example themes also add a link to the pager and displays a blank pager next to my custom pager. on the blank pager the mousover/change slide works, on my custom pager only the click to enter node works.
heres the source code of my display:
<div class="custom-pager-item-inner">
<a href="#" title="navigate to topic" class="pager-link"></a><a href="http://localhost/test/de/work/43/friends-of-the-earth-1-infofilm-textilien" class="page-link"><img src="http://localhost/test/sites/default/files/imagecache/Thumb_61/Thumb-gross_61x48_0.jpg" alt="" title="" class="imagecache imagecache-Thumb_61 imagecache-default imagecache-Thumb_61_default" width="61" height="48"></a>
</div>
if i remove the line fromt the template file
<a href="#" title="navigate to topic" class="pager-link"></a>
the pager doesnt change on mouseover anymore.
i think i am really close to fix this issue, can you please help me and point me to the right direction?
thanks in advance, cheers,
volker
Comments
Comment #1
vir_2 CreditAttribution: vir_2 commentedupdate:
i had a typo in my views-rewrite, i wrote class="page-link", but this needs to be "pager-link":
now the mouseover/change slide works on my custom pager, but when i click my custom pager, nothing happens. here is the source of the display:
hope this helps, cheers
volker
Comment #2
ppblaauw CreditAttribution: ppblaauw commentedIn the Javascript of the module the click functionality is disabled for the class a.pager-link when the pager event is mouseover with the following code:
If your second link does not have the class: pager-link, it should work.
Sorry for late reply.
Hope this helps you further, please let me know.
Comment #3
vir_2 CreditAttribution: vir_2 commentedhello and thanks for your reply,
is it also possible to only use 1
<a href="...
in the pager item andchange slide on mouseover + go to href on click?
ie my template looks like this:
note: i removed the
<a href="#" title="navigate to topic" class="pager-link">...</a>
line from the template and i also commented out thein views_slideshow_ddblock.js
i can see the link, i can also open in new tab with right mouse button, but nothing happens on click.
there must be some other place, where the click function is altered by javascript in the slideshow, i guess.
i am not familiar with jQuery, so if this is sort of a big deal to change the code, i would also be glad to pay for your efforts, just PM me.
thanks for your help in advance.
cheers,
volker
Comment #4
vir_2 CreditAttribution: vir_2 commentedfound a solution to my feature-request, but this requires to rewrite code in modul javascript code, which is not a wise thing to do:
step 1:
in views_slideshow_ddblock.js replace
with
step 2:
rewrite the pager output in views with the url to the desired node, in my case:
step 3:
in the slideshow configuration choose "Pager event: Mouseover"
step 4:
in your views-slideshow-ddblock-custom-pager.xy.tpl.php replace
with:
Comment #5
danyg CreditAttribution: danyg commentedhello,
I've experienced the same issue, and want to say thank you to Volker to his snippet.
But I've found an more secure way to fix this problem. It's not good to write directly to module's js file, so fixing in your theme is better solution.
In your theme define a js file in .info, then put Volker's code in it, using the concrete block ID.
Comment #6
chaz1975 CreditAttribution: chaz1975 commentedHi, I've had a look at this as I'm after the same thing, but I'm having a little trouble implementing it.
I added a line in my .info file saying that I had a new js file attached:
scripts[ddscript] = ddscript.js
and then added your script above into a file of the same name and cleared the cache.
I have a horrible feeling I'm completely missing something here and would be grateful for any pointers.
Best wishes,
chaz1975
Comment #7
danyg CreditAttribution: danyg commentedHi Chaz,
you don't need to name the key of the scripts array. Use as
Than flush the caches.
Comment #8
spgd01 CreditAttribution: spgd01 commentedI can confirm this works. thank you so much. It solved my problem here:
http://drupal.org/node/811154
I still think this feature should be added so that we don't have to edit the code.
Thanks
Comment #9
ppblaauw CreditAttribution: ppblaauw commentedcomitted to dev version
A setting "pager disable click" is added to the configuration page
If this is not checked the href in the pager tpl.php template file will be used to link to another page
In the tpl.php file the following can be used now:
Where $pager_item['pager_url'] is the theme_variable "pager_url" mapped in the mapping part of the configuration page.
Comment #11
vibrasphere CreditAttribution: vibrasphere commentedDon't work. I added the
print $pager_item['pager_url']
part to the link, but what's the point if the pager_text is some non-link text field? So now all pager links link to nowhere aka front page. Also there is no pager_url in the block settings for mapping, which would make sense, because you could set to it some link/url field maybe or something.Because now no matter in what way I try to make it link to the custom page or whatever, via views and etc. it starts printing two links and it breaks the pager.
Also deselecting that "pager disable click" option doesn't apply any effect.
Comment #12
vibrasphere CreditAttribution: vibrasphere commentedOkay I solved it, but this is ridiculous.
1. Create a field. A custom link field for your content type and give it whatever path you want to be linked.
2. Go to block settings and in mapping set your pager_text as some custom text field from your content type. You will use it as your custom titles for your pager buttons.
3. So in the views add this custom text field and select output this field as link and put in the custom link field token.
4. Then you go to your theme dir and in theme/custom/modules/ddblock/ edit your slider .tpl.php (e.g. mine is ddblock-cycle-pager-content--upright30p.tpl.php) and entirely remove the line 40, the one with
<a></a>
.5. Flush caches and you got it. You got pager with custom titles and custom links, switching slides when mouseover and going to the linked page when clicked.
But again, this is ridiculous.