Closed (fixed)
Project:
Drupal core
Version:
6.4
Component:
theme system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2008 at 18:47 UTC
Updated:
7 Feb 2011 at 15:36 UTC
I've found that after creating some custom nodetype template files, that I need to call the block function from the custom node.tpl.php file (node-trail_review.tpl.php). Unfortunately, it looks like the preprocess_node function isn't actually loading when I view the node. I can verify this with the "DEBUG" line, which doens't output anything to the test file...
Here is the template.php file:
function phptemplate_preprocess_node(&$vars) {
$vars['nodephoto_block'] = theme('blocks', 'nodephoto_block');
$vars['google1_block'] = theme('blocks', 'google1_block');
$vars['test'] = 'TESTSTRING';
// file_put_contents('/tmp/vars.txt',$vars); // DEBUG
}
My node-trail_review.php has echo statements for $nodephoto_block and $test, but neither show up...
Am I missing something here?
Comments
Comment #1
MMoose commentedI think this is resolved. It was related to my issue with this support request I submitted about content-type specific node.tpl.php files not loading due to node.tpl.pohp existing...
http://drupal.org/node/314543
Comment #2
ztyx commentedResolved?
Comment #3
dvessel commentedIt's not resolved. It's simply a limitation of how templates are discovered. That part can be fixed but exposes another limitation of how theming paths are resolved. Preprocess functions and templates are inherently linked. Separate the two then the paths become all screwy.
http://drupal.org/node/279573#comment-991171
Until we figure out a definitive fix for how paths are resolved, I don't think this should be fixed.
Comment #4
nsyll commentedHave you Empty the cache first ?
You should to cache the new $vars
Comment #5
xalexas commentedI had this problem also. You need to clear cache first. Go to Administer › Site configuration > Performance > clear cache.
Comment #6
webcomm commentedxalexas is right... but why is it necessary to clear the cache even when caching is disabled? (I'm using Drupal 6.20)
Comment #7
damien tournoud commented