Am new to Drupal so bear with me.

I am using Standford's Open Framework and have created a sub-theme based on it and activated it. It works. I can edit my sub-theme's style.css file and changes show up on my site.

However, when I create a templates directory and start adding my own templates to override the default ones, the changes are not showing up.

I copied, for example, the page.tpl.php file from the base theme's templates directory and modified it in my sub-theme. No changes appear. If I make the same modifications on the base theme they do show up.

Here is my directory structure. Am I missing something? Do I have to specify something in my .info file?

`-- my-sub-theme
    |-- css
    |   `-- style.css
    |-- js
    |   `-- script.js
    |-- templates
    |   `-- page.tpl.php
    `-- my-sub-theme.info 
  • 4
    If you're new to Drupal you might not have come across clearing the cache yet...after you add a template file or implement a hook, and in a few other situations, you need to clear Drupal's cache for the changes to show up. You can do this at /admin/config/development/performance, with Drush or through a shortcut in the admin menu module – Clive Jan 20 '14 at 18:17
  • @clive That fixed it - bingo! So it is caching the template hierarchy (that is, which files to read) but not the content of the files? Thanks – thornomad Jan 20 '14 at 18:23
  • Yep exactly, Drupal apps are pretty database (and in some case, file) heavy, so there's a lot of caching going on. If something doesn't work as you expect, clear the cache before trying anything else - it's a good rule to live by :) – Clive Jan 20 '14 at 18:27
  • @Clive - copy paste that as an answer because you got it first try! Thanks. – thornomad Jan 20 '14 at 22:28

Your Answer

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

Browse other questions tagged or ask your own question.