Custom theme files don't get the $themed_rows variable

BerkeleyJon - August 18, 2009 - 17:44
Project:Views Bonus Pack
Version:6.x-1.0-beta4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

I'm trying to create a custom theme file for a views export. (In my case, the file is views-bonus-export-txt--events--feed-2.tpl.php, based on the default file views-bonus-export-txt.tpl.php) Drupal is successfully finding and using the custom theme file.

The default file loops over the $themed rows array; that array returns NULL in my custom file. The $rows array is available to the custom theme file, but not the $themed_rows array.

(Note: this may duplicate this issue: #546542: Cannot theme views-bonus-export.xxx.tpl.php)

Any ideas?

#1

BerkeleyJon - August 18, 2009 - 18:24

PS - I should add that this worked a couple of months ago. I'm not sure which update made this stop working, or whether it was a change to the Views module rather than the Views Update module.

PPS - The same code that doesn't work as a custom template file *does* work if I replace the existing default template file. So I don't think it's a bug in the template code.

#2

neclimdul - August 19, 2009 - 05:58

Annoying, merlin mentioned there's a core bug for this related to including the file for module preprocessing functions and the patterns that views uses. Will have to explore more. Not sure if its related to the other issue but it likely is.

#3

neclimdul - August 19, 2009 - 05:59

PS - Is there such a thing as a "Views Update module"?

#4

BerkeleyJon - August 31, 2009 - 23:40

Whoops. Not "Views Update" ... I meant "Views Bonus Pack", or course. My mistake.

#5

mshaver - September 3, 2009 - 15:28

I can confirm the issue is with the $themed_rows array when trying to override the views-bonus-export-xxx.tpl.php templates in your own theme. So the only option at this point is to overwrite the module template?

#6

gausarts - October 4, 2009 - 08:41

Yeah, sadly I have to override the module templates within the module itself :(

#7

neclimdul - October 4, 2009 - 16:37

#8

Coyote - December 4, 2009 - 04:45

I'm pretty sure the problem I'm having is related:

If I put an override template in my theme folder, instead of prompting a file download, it displays to screen. Additionally, the behavior mentioned above, with $themed_rows being empty occurs.

 
 

Drupal is a registered trademark of Dries Buytaert.