Thread tagged as: Hosting, Discussion

Can I use referenced Master Pages for development and copied Master Pages for de...

It's obviously my responsibility to roll with my server situation and my resources for troubleshooting my hosting environment, so I'd just ask a question regarding a workflow I'm using to get around a problem.

In my development environment, referenced Master Pages work as expected. However, when deploying on the server, I get a PHP error when viewing a page created by referencing a Master Page. This is probably due to my server environment and the document root configuration, and obviously the best solution would be to fix that.

However, since my server situation is probably not set up very well, I'm just wondering if I can keep copying the PHP contents of the Master Page file over the contents of the individual page file before deploying to the live website. (I also replaced the variable in the Perch Runtime inclusion at the top of the file with a normal relative URI pointing to the exact location of the runtime relative to the location of the specific page in the site's hierarchy.)

Obviously, I could just use copied Master Pages in the first place, and I may do so for some parts of the website. However, I've already set up one level of the site using referenced Master Pages. Also, for development purposes I like the convenience of being able to edit one file and have the changes reflected in all the associated pages.

So, I want to know if continuing to copy over the individual pages with the contents of the Master Page will likely cause any other problems.

For the record, I don't believe that I'm technically developing in a sub-directory of the main site, since I'm pointing the domain to the subfolder that I'm developing in, and I have no plans to ever move the site to the root of the web server account. There are other websites and a lot of miscellaneous old files on this web server account that I don't necessarily have control over.

But copying the template over the page files works for me, as long as it won't cause other errors down the road.

Paul Lee

Paul Lee 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

One solution would be to switch to Perch Runway, and then you'd not need to worry about pages being created at all. It doesn't create a copy or a reference of the master page, it just routes the URL to it.