GetSimple Support Forum
Innovation theme - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Innovation theme (/showthread.php?tid=2028)



Innovation theme - Carlos - 2011-08-01

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)


Innovation theme - ccagle8 - 2011-08-01

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...


Innovation theme - Connie - 2011-08-01

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


Innovation theme - Carlos - 2011-08-01

@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.)


Innovation theme - n00dles101 - 2011-08-01

I've gotten into the habit of naming included files with ".inc" rather than ".php"

Maybe we could just rename to this.


Innovation theme - Carlos - 2011-08-01

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" ...


Innovation theme - ccagle8 - 2011-08-01

i like the .inc.php check first... Great idea!


Innovation theme - ccagle8 - 2011-08-02

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/source/detail?r=524


Innovation theme - Connie - 2011-08-02

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!


Innovation theme - ccagle8 - 2011-08-02

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...