Hi,

I'm a bit confused about something: when theming a views slideshow. In normal views, I can overwrite the style template which dynamically generates all the fields through a foreach loop.

Am I correct that views slideshow bypasses this step? It seems that the equivalent is to add the top navigation, a single 'slideshow' output and bottom navigation.

I can live with this if I can overwrite a preprocess function or so, but now I don't know how to do it. I looked in the views_slideshow.theme.inc file and saw that the rows are already processed when it comes to $vars['rows'] in function _views_slideshow_preprocess_views_slideshow(&$vars).

My end-goal is to add a class to the row wrapper on every 4th row for theming purposes. (margin on all rows except the last). I show 8 views rows per slide.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Danny_Joris’s picture

Title: Theming views rows » views slideshow cycle: add views-row-last
Category: support » feature
FileSize
88.46 KB

So.. to start, I was confused about where to look for template files. The fact that no views slideshow CYCLE template files were listed in the views overrides made me look into the wrong folders. I guess the views_slideshow cycle template files do not lend them self to be overwritten by views namespaces.

I have to say that for a while i had mistaken views field wrappers with views row wrappers. :/

Another confusion I had is that in the 8 rows there was a views-row-first class, but no views-row-last, which made me think that the numbered views-row classes would further increment after views-row-7, but it doesn't. In that case i wouldn't need to overwrite views row classes as I have enough to work with there already.

Maybe I should turn this issue into a feature request to add a views-row-last class?

Danny_Joris’s picture

Priority: Normal » Minor
loparr’s picture

It has been quite a time and nobody is interested in this? Have you solved it? Thank you

NickDickinsonWilde’s picture

Component: Code » Cycle
Assigned: Unassigned » NickDickinsonWilde
Issue summary: View changes
Status: Active » Needs work

  • NickWilde committed d9cd03d on 7.x-3.x
    Issue #1360952 by NickWilde: views slideshow cycle: add views-row-last
    
NickDickinsonWilde’s picture

Assigned: NickDickinsonWilde » Unassigned
Status: Needs work » Fixed

Done, thanks for noticing/requesting :)

Status: Fixed » Closed (fixed)

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