sys info: drupal 6 installation, with tons of modules... too many to list.
the problem: only a certain content type will not load it's template file correctly. some nodes that would be displayed on these pages through views are making it to the markup. they are the only content that gets loaded. the template file that this content falls back on is node-event.tpl
the objective: to load page-team.tpl.php
template suggestions are loaded in two ways in template.php through preprocessing via
mytheme_preprocess_page(&$vars, $hook)
converted from _phptemplate_variables ()
in a drupal 5 installation.
method 1:
if (module_exists('path')) {
$alias = drupal_get_path_alias(str_replace('/edit','',$_GET['q']));
if ($alias != $_GET['q']) {
$template_filename = 'page';
foreach (explode('/', $alias) as $path_part) {
$template_filename = $template_filename . '-' . $path_part;
$vars['template_files'][] = $template_filename;
}
}
}
method 2:
if ($vars['node']->og_groups['0'] || preg_match('/fdl\//',$vars['node']->path) || (preg_match('/og\/manage/',$alias) || preg_match('/og\/invite/',$alias) || preg_match('/og\/users/',$alias)) || (preg_match('/node\/add/',$alias) && $_GET['gids'] != '') || $vars['node']->og_description || (arg(0) == 'user' && is_numeric(arg(1)))) {
$vars['template_files'][] = 'page-team';
}
page-team is the tpl that is missing, and i suspect there may be an error with my code above (method 2).
i'm attempting to load this template for all pages with the first path argument of "fdl" so site.com/fdl and all children of fdl.
i know there are lots of possibilities. but i have a feeling the error is here. thanks for any help you can offer.
i found a deprecated link function in the template. updating the parameters fixed everything.