Changing Drupal module template doesn't take effect

1.6k views Asked by At

Okay, this could be a stupid question but I'm kind of new to this Drupal-stuff so I have to ask it anyway :)

I'm trying to implement the FBSS-module (FaceBook Style Status). It all works just fine. I was even able to change some colors and stuff in the CSS-file.

The thing is that I want to do some changes to the template, need to add and remove some stuff. I could hide stuff with CSS, but that sounds like a crappy solution.

I tried to edit:

/sites/all/modules/facebook_status/templates/facebook-status-item.tpl.php

But it has no effect what so ever. I tried to move it to my theme-folder. Same thing.

And yes, I've cleared the cache.

Update: Is there any way to find out if the module is actually using this template-file?

2

There are 2 answers

0
Dan Hanly On

I've found, and I'm not sure if this solution would suit, that I apply a different theme and then re-apply my adjusted theme and all the changes propagate. No idea why but sometimes I don't see any changes until I do this.

Like I said, this may be isolated to myself, but it's worth a try to help you hit your deadline!

3
32i On

first, move it back to the module page - I bet this template is used by module. secondly, if you change templates, it might require theme registry cache reset, so go to /admin/build/themes. You don't have to actually switch themes.

Do you have cache enabled? while developing, it's would be helpful to do 2 things: 1) disable cache 2) go to theme settings, and turn on "rebuild theme registry on every page load" or something that sounds like this.

and to be 100% sure, if you added new template you need to: 1) clear cache 2) go to admin/build/modules (that will rescan template files, etc) 3) go to admin/build/modules (that will rescan info about theme).

in the case of editing existing template, this also can help.