I ran into a situation where I was using nodes for my slides, and I needed to display the title of the node instead of simply numbers in the pager.

This patch adds a new Pager Type called "Node Titles". If you select this option, and you are using Row Type: Node, then it will display the node titles instead of simply numbers!

It also streamlines the javascript slightly to make it easier to add more pager types in the future.

Comments

amclin’s picture

StatusFileSize
new6.37 KB

There were a couple of minor issues with the patch (didn't test after refactoring)

Here's a corrected patch.

dddave’s picture

Status: Active » Needs review
fletch11’s picture

thanks for the patch but I'm not seeing the pager option after applying the patch. This would be a great contribution and would love to see this added.

amclin’s picture

It should show as a 3rd type of pager you can pick. It also will only work if you're using Node as your view row type.

nxqamar’s picture

so i have never dealt with patches before. So where exactly (file) do i apply this patch? I came across this link on how to apply patches in windows http://drupal.org/node/60179.

nxqamar’s picture

figured out with eclipse ide. dynedain thanks a lot for helping all of us.

psynaptic’s picture

Status: Needs review » Needs work

Sorry to be a pain but the patch doesn't follow Drupal's coding standards. Please could you re-roll the patch following the guide?

http://drupal.org/coding-standards

amclin’s picture

StatusFileSize
new5.95 KB

Here's a new patch that should follow Drupal's coding style.

Who's bright idea was it to use 2 spaces instead of tab for indentation anyways?

psynaptic’s picture

This patch failed to apply to DRUPAL-6--2.

psynaptic’s picture

Status: Needs work » Fixed

Ok, I needed this feature myself and I managed to implement it with the latest dev release. Please try that and see the new options.

shane birley’s picture

I don't see the code having been added. Was this committed?

psynaptic’s picture

This code was not added as it is not needed. The feature already exists in dev.

shane birley’s picture

I am running dev but still don't see it. I must be crazy?

christianpound’s picture

subscribe

psynaptic’s picture

Are you using thumbnail hover?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

amclin’s picture

Adding this to Thumbnail Hover node is NOT the same thing as adding titled pagers to Single Frame node. Please reopen this ticket and add the additional Pager type to Single Frame.

In my situation, I need to use Pager, not Breakouts. Breakouts in Thumbnail Hover will only display under the slides.

marioboro’s picture

Status: Closed (fixed) » Active
StatusFileSize
new13.45 KB

Hello dynedain,

thank you for the patch. Please would you be so helpful to give me some instructions?
I have applied your patch and in the settings of the slideshow i can now select "Node Titles", but they are not showed in the frontend. If i use "Numbered" it works. I have installed the 6.x.2.0-beta2 Version, because the patch is not compatible with the current version of views slideshow.

Please if you hove some free minutes to answer me. I agonize now 2 days with it.

Thank you very much!

Regards,
Mario

redndahead’s picture

Status: Active » Postponed (maintainer needs more info)

Marloboro Why is Thumbnailhover not an option? This would be simple to do. Just choose the image as the main area and the title as the breakout.

marioboro’s picture

Hello redndahead,

thank you for the answer. Sorry but i´m a little bit confused now. If i choose thumbnailhover instead of singleframe, i don´t have any options to set the title as the breakout.
Do i have to use the newest version of views slideshow?

Please would you be so helpful and explain it more detailed?

Thank you!

redndahead’s picture

You need to choose Title as one of your fields and then it will show up in the settings.

marioboro’s picture

StatusFileSize
new34.79 KB

Sorry, but i have choose the title as one of the fields, please see my attachement. And do i have to install the latest version?
Thank you for your understanding!

redndahead’s picture

Ok do you have the thumbnailhover module enabled? If so then under slideshow settings choose thumbnailhover. Make sure you are using the latest version of views slideshow also?

marioboro’s picture

Your great, thank you a lot!
The issue was that i have tried it with an older module version and the patch. So it can´t be functional.

A last question please. Is it possible to define a tag rather a css for the title. (link, hover, active)?

redndahead’s picture

I'm not sure what you are asking can you rephrase that?

marioboro’s picture

OK, sorry ...
I´m using the titles to switch between the nodes in the slideshow.
But the titles don´t have a a tag, so i can´t define a CSS for link, hover and active state.
How i can solve this?

Thank you!

intyms’s picture

@#26 marioboro

But the titles don´t have a a tag, so i can´t define a CSS for link, hover and active state

Hi, click on the title field and check "Rewrite the output of this field".
Paste this code:

<a>
  [title]
</a>
marioboro’s picture

Hi intyms,

that´s it! Thank you a lot for helping.

intyms’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mlconnor’s picture

A much easier way to do this without patching modules.
1. In views, add the field for the title, but hide the label.
2. Use a jQuery selector in the header of your view to replace the page number with the title and then hide the title.
3. Hide the title with CSS that can be added to the same header.

<style>
  #views_slideshow_singleframe_main_slidshow-page_1 .views-field-title {display:none; }
</style>
<script>
jQuery(document).ready(function($) {
  // Code using $ as usual goes here.
  $('#views_slideshow_singleframe_main_slidshow-page_1 .views-field-title SPAN').each(function(a, b) {
     $('.pager-item:eq(' + a + ') A').text($(this).text());
  });
});
</script>

This is easy breezy, and doesn't require patching anything. I was able to put this together in 10 minutes.

mattsplatw’s picture

Would there be a similar approach for row style "node"? With this setting, you can't add any fields to the view. Or do I misunderstand?

asb’s picture

Re #12 vs. #13: "This code was not added as it is not needed. The feature already exists in dev."

Is this really in 6.x-2.x-dev?

syntheticMedia’s picture

Category: feature » support
Status: Closed (fixed) » Active

@#26 marioboro

But the titles don´t have a a tag, so i can´t define a CSS for link, hover and active state

can you please tell me more about this (I have followed these steps exactly)? i am trying to replicate the manner in which single frame allows you to style for the currently active slide. In other words, when the slide is active, I want a black background, and when it is not active, no background. So, basically every n seconds the black background advances, just like with singleframe.

I have done this in css:

.views_slideshow_thumbnailhover_active_teaser {
background-color:#000;
}

however the active slide does not seem to change, its always stuck at the first breakout field. In other words, the class .views_slideshow_thumbnailhover_active_teaser is only ever active on the first breakout field and does not update as with the behavior found in singleframe, (while all other slides remain with a class of .views_slideshow_thumbnailhover_div_breakout_teaser.)

Please advise, thanks!

EDIT - just saw this- does this mean that i cannot achieve active slide like with singleframe? I have tried the dev version, and fields as pager are not avialble. Furthermore, I was going to try ver3, however I do not feel as if views 3 is reliable enough yet.

Adding this to Thumbnail Hover node is NOT the same thing as adding titled pagers to Single Frame node. Please reopen this ticket and add the additional Pager type to Single Frame.

In my situation, I need to use Pager, not Breakouts. Breakouts in Thumbnail Hover will only display under the slides.

redndahead’s picture

Status: Active » Closed (fixed)

You can display the pager on the top or the bottom. There is an option (Display breakout fields last) Uncheck that box to make it first.

asb’s picture

Status: Closed (fixed) » Active

Sorry, the issue's title is "Display Node Titles instead of Slide numbers in the pager", and I can not see how this is "fixed" by #35.

However, I'm not entirely sure that I can imagine a use case where the node title actually would be needed in the pager (in the slideshow it's available through Views anyway).

So I'd suggest to either leave this open (and wait for a use case), or to change it to "won't fix" (if no use case exists).

redndahead’s picture

Status: Active » Closed (fixed)

The original issue was marked fixed. I was answering #34. For answers on the original issue read #19 #20 and #21 you need to use thumbnailhover. You can add fields using that. There are instructions in our documentation on how to use thumbnailhover. This was marked fixed for over a year and probably should stay that way.