Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Innovation theme
#1
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)
Reply
#2
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!
Reply
#3
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
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#4
@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.)
Reply
#5
I've gotten into the habit of naming included files with ".inc" rather than ".php"

Maybe we could just rename to this.
My Github Repos: Github
Website: DigiMute
Reply
#6
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" ...
Reply
#7
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!
Reply
#8
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!
Reply
#9
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!
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#10
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!
Reply




Users browsing this thread: 1 Guest(s)