"Rescan template files" button
mooffie - June 16, 2008 - 06:57
| Project: | Views |
| Version: | 6.x-2.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
The help says that by visiting 'administer >> site building >> themes' it's possible to clear the theme cache. This isn't true, at least not on my system: merely visiting that page doesn't call drupal_rebuild_theme_registry() (it's hitting 'Submit' that does).
This patch makes it easier for themers by adding a "Rescan template files" button to the "Theme: Information" section.
I'm attaching a screenshot and a patch.
| Attachment | Size |
|---|---|
| rescan_templates.png | 57.46 KB |

#1
...and the patch.
#2
(I know that in Drupal's lingo the common expression is "clear theme's cache" or "clear the theme registry", but I think that the term "rescan" is easier to understand.)
#3
Committed! Thanks for the patch!
#4
Thanks for committing it, I believe it's a valuale feature.
Note, however, that I've found an elusive bug with this button, and published a patch. Sorry for the bother.
#5
Automatically closed -- issue fixed for two weeks with no activity.
#6
I'm really glad you put this button *somewhere*... because i was getting really frustrated not knowing why my templates were not working... I clicked this button, and was relieved to see that I was not, in fact, crazy.
Now... my only issue is that is it hidden, and hard to find - considering how essential it seems to be. Also even the "important" notice is in grey. This would be a great button to just put all over the place, or mention it everywhere. Not sure where else would be a good place... while looking for a solution to my problem, I tried several places over the course of 3 hours...
- I looked on Drupal.org, google (but didn't know what was wrong so this didn't help)
- I looked on the views list page for some indication of "oh you made some templates, and they're not apparently working? click here- all your problems solved.
- I also looked in the readme.txt of views
- and I looked on the editing screen of the view itself... many many times... before even noticing the "Theme Information" options... and even then, I didn't see the great little button for several tries, messing around with the different options and theme examples...
I have advanced help installed, but nothing came up.
OR... how about an additional THEME-README.txt file? with something like:
#7
heather: Here is the awesomest part.
I've already done almost precisely what you ask. Check this out.
There's a help topic entitled Using Views templates.
This topic lists the most important things you need to know about templates. Including:
#8
#9
wo0t!! i see it now :)
the thing is, anubi like me, i didn't know what my problem was... so although i went to the handbook... i didn't see the solution. and of course, just installing advanced help, this mention didn't appear to me when i needed it.
i'd still be in favor of mentioning this fact on the views list page, in context, just like the modules page points out:
something like:
#10
Automatically closed -- issue fixed for two weeks with no activity.