Forum

Thread tagged as: Problem, Error

Creating pages with .html extension from Master Page with .php extension

Hey again,

I'd raised a ticket yesterday re: Perch 2.7 no longer seeing master page templates with a .html extension. The reply was:

I could be wrong, but I've checked my git commit history, and I don't think we've ever supported master pages with a .html extension. Do you have other master pages that aren't .php files?

I'd mentioned that I'd been using master page templates with .html extension for my entire time developing with Perch - around a year and a half. The 2.7/2.7.1 updates no longer recognized these pages. However, I still require creating pages with .html extensions, and cannot figure out how.

Now that my master page templates have a .php extension, all created pages have .php extensions as well, unless "This page will have more pages below it" is set (which results in an index.html file being created).

My config file includes two lines which I had thought would generate .html files:

define('PERCH_DEFAULT_DOC', 'index.html');
define('PERCH_DEFAULT_EXT', '.html');

It appears the the first rule works, as I can create index.html from a master page template with a .php extension, however, when I create a page and do not check " This page will have more pages below it" I end up with a .php file. I assumed the second rule would take care of this - if that's not the case, what is this config setting for? And again, I had no issue with this (using master page templates with .html extensions) prior to 2.7 (2.7.1 does not fix this either). The other issue is that I could not update existing sites beyond 2.6.6 without a lot of manual intervention.

Any help would be appreciated - let me know if I can provide more detail.

Update:

FYI, the diagnostics report seems to corroborate that my config file is correct, if that's helpful:

PERCH_DEFAULT_DOC: index.html
PERCH_DEFAULT_EXT: .html
Richard Terrick

Richard Terrick 3 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I'll have a look and see if we can make this an option in a future release.