Posts: 3,491
Threads: 106
Joined: Mar 2010
In GetSimple's page editor, the user can select a non-template file as a template for a page (sidebar, header, footer), breaking the rendered page.
This problem happens (or would happen) with any theme that has several non-template .php files besides functions.php (which is excluded from the template dropdown).
(Possible fix: stuff everything in the template.php file)
Posts: 1,848
Threads: 86
Joined: Aug 2009
I'm wondering if we can set a variable inside that template file (eg: footer.php) that will force it to now show itself in that dropdown...
I dont like that this can happen either...
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 2,928
Threads: 195
Joined: Feb 2011
Carlos Wrote:(Possible fix: stuff everything in the template.php file)
Carlos, that is not a fix, as it cuts down flexibility ... But I think, Chris' idea can be helpful , a variable that stops the "partial template" to be set as page-template
Posts: 3,491
Threads: 106
Joined: Mar 2010
2011-08-01, 16:43:53
(This post was last modified: 2011-08-01, 16:44:31 by fotothink.)
@ccagle8
Another option could be excluding/including files in the dropdown by name, doing one of these:
1. list everything but inc-*.php (and functions.php)
+ Rename non-template files to inc-sidebar.php, inc-header.php...
(alternatives: sidebar.inc.php, inc_sidebar.php, etc.)
2. list only template*.php files
+ If you use other template files besides template.php, you'd have to make sure their names begin with "template"
(alternatives: template-name.php, name-template.php, etc.)
Posts: 1,108
Threads: 70
Joined: Aug 2009
I've gotten into the habit of naming included files with ".inc" rather than ".php"
Maybe we could just rename to this.
Posts: 3,491
Threads: 106
Joined: Mar 2010
2011-08-01, 17:55:33
(This post was last modified: 2011-08-01, 17:57:24 by fotothink.)
n00dles101 Wrote:I've gotten into the habit of naming included files with ".inc" rather than ".php"
Maybe we could just rename to this.
Some servers treat ".inc" as a text file, unless you configure to treat them as php files.
Maybe better ".inc.php" ...
Posts: 1,848
Threads: 86
Joined: Aug 2009
i like the .inc.php check first... Great idea!
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 1,848
Threads: 86
Joined: Aug 2009
Done! that was a great idea everyone... when great minds get together we can create some pretty good fixes to obvious problems.
http://code.google.com/p/get-simple-cms/...tail?r=524
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 2,928
Threads: 195
Joined: Feb 2011
great idea, now I have to work on my theme ;=)
let's not forget to documentate that in the wiki when the version is out!
Posts: 1,848
Threads: 86
Joined: Aug 2009
Connie Wrote:let's not forget to documentate that in the wiki when the version is out!
Im going to add it now, and just add (3.1+) beside it...
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!