By randomblink on
I'm TRYING to use theme_hook_suggestions and getting nowhere.
// Get the Card Type
// $variables['node']->field_card_type['und'][0]['taxonomy_term']->name
if ($variables['node']->type == 'netrunner_card' )
{
if ($variables['view_mode'] == 'full')
{
$blinksFileName = $variables['node']->field_card_type['und'][0]['taxonomy_term']->name;
$blinksFileName = str_replace( " ", "_", $blinksFileName);
$blinksTemplateName = 'node__netrunner_card__' . $blinksFileName . '__full';
$variables['theme_hook_suggestions'][] = $blinksTemplateName;
}
}
Initially? Instead of adding in all of these tweaks I had a simple:
$variables['theme_hook_suggestions'][] = 'node__netrunner_card_full';
And I was happy.
But then I realized I could theme out each TYPE of card... The problem is... none of the tpl files I've made are working now.
node--netrunner-card--Runner-Identity-Card--full.php
node--netrunner-card--Operation--full.php
Nothing...
I have no idea where to go from here.
I'm wondering if the filenames are too long possibly?
I am using Devel but I cann't (for the life of me) figure out how to find out which tpl files are being used to output the information?
Comments
Devel Themer is useful for
Devel Themer is useful for things like this sometimes. I suggest you open up two tabs, one to enable the module and one with the page you want to work with because it will likely mess up your admin menu a little.
http://drupal.org/project/devel_themer
Devel_Themer
I'm using this...
How do I get it to tell me what tpl files were used to build the current page?
And I tried to dpr my $variables but I couldn't find theme_hook_suggestions in there?! I could print_r($variables['theme_hook_suggestions']); but I couldn't dig through the variable output via print_r or DPR or KPR to find theme_hook_suggestions...
Lost.