Problem/Motivation
Using the templates/page.tpl.php file provided in the Bartik theme generates (needless) PHP warnings.
Proposed resolution
Patch attached
| Comment | File | Size | Author |
|---|---|---|---|
| page.tpl_.php_.diff | 3.44 KB | leewillis77 |
Using the templates/page.tpl.php file provided in the Bartik theme generates (needless) PHP warnings.
Patch attached
| Comment | File | Size | Author |
|---|---|---|---|
| page.tpl_.php_.diff | 3.44 KB | leewillis77 |
Comments
Comment #1
droplet commentedat what case you see these error? most of them are global theme $var, should be init. before theme loaded
Comment #2
leewillis77 commentedSo - I have a fresh install of drupal 7.9, and I'm developing my own theme.
I've created my own theme, created the .info and .css files, and then copied the page.tlp.php in from Bartik to use as a base to customise. If I access any page on the frontend of my site that uses that as a template then I get the errors, e.g.
Notice: Undefined index: featured in include() (line 133 of /var/www/webserver/snugbaby/sites/default/themes/snugbaby/page.tpl.php).
Note: I'm newish to drupal, so if I'm doing something wacky - do let me know - but everything seems sensible [And is working aside from the warnings], I'm guessing the warnings are triggered because I haven't configured those blocks, but since I have no intention of using them I don't think I should have to?
Comment #3
droplet commentedyou need to make a sub-theme:
http://drupal.org/node/225125
or also copy the template.php to your theme folder.
Comment #4
leewillis77 commentedI should have mentioned that my theme is already a subtheme, e.g. the .info file is:
name = Snugbaby
base theme = bartik
description = Snugbaby Themes
version = 0.1
core = 7.x
stylesheets[all][] = snugbaby.css
Shouldn't that result in template.php being included from bartik?
Comment #5
droplet commented@leewillis,
Comment #6
leewillis77 commentedPerfect - that sorted it - sorry for wasting your time :)
Comment #7
Everett Zufelt commented