Master Pages and file suffix

  • When we first came to Perch Version 1, one of the aspects that attracted us was that Perch would generate php content but allow it to be suffixed .html There was an instruction in the Docs at the time telling us how to get Perch to suffix our pages .html and not .php, though I can't find that instruction today.


    This was (and remains) a big deal for us. Back then we already had 250+ non-Perch legacy pages which were all suffixed .html of course. The idea of new content being suffixed .php simply would have driven our readers nuts.


    So big kudos to Perch for allowing all our pages to be .html


    We followed the instructions for making Master Pages and these were all created with .html suffix at the time.


    So now we have maybe 2000 pages created in Perch, all using about 15 Master Pages suffixed .html


    Thus:


    php include(str_replace('/', DIRECTORY_SEPARATOR, 'editorial/templates/pages/LossTemplateAncient.html')); ( where LossTemplateAncient.html is a Master Page)


    All went swimmingly till about 3 years ago when suddenly we were unable to create new Master Pages. I raised this in the forums but no progress was made and we have just made do with the Master Pages we had in existence.


    But now we do need new Master Pages. Our experienced developer-friend confirmed that .html Master Pages were not making themselves visible in Perch on our system, but when he tried the same Master Page but suffixed it .php then it appeared.


    We can certainly work with new Master Pages being suffixed .php BUT there seems to be a problem.


    When I tried to create a page using a .php Master Page it always ends up with a page suffixed .php


    I cannot find a way to create a page suffixed .html from a Master Page suffixed .php


    This is unworkable for us as explained earlier.


    (1) can pages be created with suffix .html from Master Pages suffixed with .php ?


    (2) will all our content at any time in the future become unreadable because it is all suffixed .html and was all created from Master Pages suffixed .html. Currently everything is working fine and has been for the past 3 years, but the future concerns me: if suddenly all our Master Pages suffixed .html stopped working that would be a disaster for us.


    Thanks for any guidance you can provide

  • There was an instruction in the Docs at the time telling us how to get Perch to suffix our pages .html and not .php, though I can't find that instruction today.

    https://docs.grabaperch.com/pe…-started/file-extensions/


    (1) can pages be created with suffix .html from Master Pages suffixed with .php ?

    Yes, master pages should be recognised as long as the file extension is .php or the value of the PERCH_DEFAULT_EXT setting in your config file.

    (2) will all our content at any time in the future become unreadable because it is all suffixed .html and was all created from Master Pages suffixed .html.

    All your content at some time in the future will become unreadable. If indefinite longevity of your content is a particular priority you should be using flat HTML files, not a dynamic CMS.