Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.0-beta3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 May 2008 at 21:23 UTC
Updated:
11 Jun 2008 at 22:25 UTC
I'm working with a view "news_admin_list" and am displaying it on a page via:
$view = views_get_view('news_admin_list');
print $view->execute_display('default'); From what I understand, someone should be able to override the default template file for a specific view by placing a correctly named file in their active theme directory. I have copy/pasted a lot of the default views.tpl.php files into my current theme and views recognizes and uses them, but for some reason they don't have access to the php variables.
For instance:
File: views-view-table--news-admin-list.tpl.php
print "<br /><br />This part shows up<br /><br />";
php print_r($row); //this displays nothing
php print_r($header); //neither does this So I'm curious if it's a bug or what is going on here? Views obviously recognizes the template file being used, but none of the php variables are assigned? Any ideas?
Thank you.
Comments
Comment #1
merlinofchaos commentedThere is a bug in Drupal core that is mentioned in the help file for the theme: information page; you need to use the Drupal 6-dev until 6.3 comes out; that fixes this problem. (Upon updating to Drupal 6 dev or utilizing the patch, which is linked from said help file (I don't remember the nid offhand or I'd post it here) be sure to clear cache to get all the theme registry stuff to update).
Comment #2
buchannon commentedAh alright. I must have missed that help file. I figured that this is probably a pretty common question here but I searched for about half an hour (google and drupal.org) on it and couldn't find anything.
Thank you for the info.
Comment #3
buchannon commentedWell I set out to find the help file you are speaking of and am failing. If you get a chance, could you specify what you mean by the "theme: information page" ? I couldn't find hardly any help pages that were directed towards themes and none of the readme files in the directory contained any information on this either.
Thanks in advance.
Comment #4
merlinofchaos commentedOn any view, at the bottom of the Basic settings, there is a Theme: information link that gives lots of information about templates. Once clicked on, the ajax area opens up and at the title there will be a help question mark.
The help file is named Theme information within the help tree, as well.
Comment #5
buchannon commentedAha! Thank you.
I actually had the "Theme: information" part of the view open in another tab when I read that. I never noticed the little question mark image before.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.