views-slideshow-ddblock issue

ppblaauw's picture

EDIT (ISSUE SOLVED)

The views_slideshow_ddblock module is a plugin for the views_slideshow views style plugin.

I developed the views_slideshow_ddblock module but have an issue which I have no solution for. There is an issue created in the issue queue of the module and I have posted an issue in the development forum, but I don't have a solution yet.

Description setup:
In the views_slideshow ddblock module I define a template file and a preprocess function for this template.
In the preprocess function I add variables for the template file and I define candidate template files.

Module files and preprocess function
template file: views-slideshow-ddblock.tpl.php
preprocess function: template_preprocess_views_slideshow_ddblock
candidate template file defined: views-slideshow-ddblock-cycle-block-content-'. $options['custom_template']

In my theme I have a copy of the template file (Don't know if this is really needed anymore. In the theming documentation is stated that this is not needed anymore after Drupal 6.6, but issues like http://drupal.org/node/311201 suggest it is not fixed) and another preprocess function to add variables for the candidate template file in the theme

Theme files and preprocess function
template file: views-slideshow-ddblock.tpl.php
candidate template file: views-slideshow-ddblock-cycle-block-content-upright10.tpl.php
preprocess function: [theme_name]_preprocess_views_slideshow_ddblock

My understanding
The way it is set up it should never use the template file in the module or the copy of this template file in the theme, but always the candidate template file (when available).
When no candidate template file available it should use the copy of the template file in the theme.
When no copy of the template file available in the theme it should use the template file in the module.

The issue
The issue is that the template file in the module is used instead of the candidate template file in the theme when the view is adjusted or the content in a node used in the view is adjusted. After reloading the page or clearing the cache the candidate template file is used.

further infrmation
Further information can be found in the issue slideshow does not appear where I will also post my own further experiences.

workaround
There is a workaround to move the code from the preprocess function in the module to the theme preprocess function (this way the candidate template file is always used), but that should not be necessary.

Hope someone can explain why the preprocess function in the module is not called on loads after the cache is cleared or where I am mistaken in my assumptions, to find a solution for this issue

Thanks all who put time and effort into this.

Philip Blaauw
views_slideshow_ddblock module maintainer

Login to post comments

Solution found

ppblaauw's picture
ppblaauw - Mon, 2009-10-12 10:02

Found a solution, see issue in the views_slideshow_ddblock issue queue.