0

In my sub-theme, I needed to adjust the HTML of a component that was part of the parent theme. To that effect I copied that components .tpl into my sub-theme's directory and made the alterations.

I then renamed it in accordance to theme debugs file name suggestions. I've done this many time before with no problem.

However, the alterations are not appearing on my site. I've run drush cc all and drush rr of course, but to not affect.

Would anyone know what's happening here?

  • 1
    Not just based on this. Could you post maybe the changes you're making, your subtheme's info file and where you're locating the file and the file name you're giving it? – rovr138 Dec 23 '16 at 4:46
  • Which function are you using to integrate the tpl's? – DarkteK Dec 23 '16 at 15:22
  • Perhaps a stupid question (just checking), but did you actually switch to the sub-theme after you created it? – Neograph734 Dec 23 '16 at 19:59
  • @rovr138 Hi, sorry for the delay. The original file is in a sub-directory of the theme's directory. The new file is in my sub-theme's root. I thought this was ok, as this is the same way I've done it with other files. – MeltingDog Jan 2 '17 at 23:21
0

Please try to see to follow same folder structure in base theme which parent theme have for .tpl files. Also check if you added base template file e.g. node.tpl.php for node--type.tpl.php link and also implement THEME_preprocess_page.

function THEME_preprocess_page(&$variables){
  if (isset($variables['node']->type)) {
   // If the content type's machine name is "my_machine_name" the file
   // name will be "page--my-machine-name.tpl.php".
   $variables['theme_hook_suggestions'][] = 'page__' . $variables['node']->type;
   }
} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.