PHPTemplate goes to the work of including hard-coded HTML for a default full page view. This can be styled via CSS, but the directory scanning function it uses to detect installed themes ignores anything that doesn't include a page.tpl.php.
Since the engine provides a default page, this restriction seems unecessary. It's also breaking a relatively simple pure CSS theme I'm working on -- I could include a dummy page.tpl.php, but that would violate the whole purpose of demonstrating that Drupal is super-skinnable. ;)
The following EXTREMELY simple patch removes this blind spot, and detects themes that have a page.tpl.php, a template.php, or a style.css file. The presence of at least one of those should be enough to find any theme.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | theme_scan_0.patch | 1.03 KB | eaton |
| theme_scan.patch | 719 bytes | eaton |
Comments
Comment #1
eaton commentedMeh, scratch that -- when this pattern is used, PHPTemplate itself shows up as a theme.
Comment #2
quicksketch+1 Seems fair enough. With PHP short circuiting the 'OR' logic here anyway there will be absolutely no performance difference.
I also like the idea that a designer could be saved the trouble of any unnecessary php files. Dramatic renactment: Programmer: "Then you just open up the .tpl.php file..." Designer: "C-syntax language, AAAA! Help! Panic!"
Well... you get the idea. ;-)
Comment #3
eaton commentedThis version of the patch works perfectly, BUT it requires that a themename.info file be placed in the theme directory. We could key off of a template.php file instead, or any other file... The real problem is that we should provide a default HTML layout and allow themes to *use* it, just skinning as necessary.
The inability to create a 'pure' CSS theme is a definite stumbling block, and one that's giving me problems with a client project that depends on extensive multi-site support with slim themes for each different multisite install.
I'd really love to see this 'blind spot' be resolved in some way...
Comment #4
coreb commentedMoving out of the "x.y.z" queue to a real queue.
Comment #5
eaton commentedThis is possible now using .info files in Drupal 6.
Comment #6
(not verified) commented