Jump to content

Integrating / adapting Processwire to existing website pages


Godfrey
 Share

Recommended Posts

Right now I have my processwire files in a folder called "processwire" on my remote server, as a child of the root folder. I'm wondering how I can begin to apply the CMS process to my existing website pages instead of the default, sample site. 

I'm guessing I can start by moving all those files in the "processwire" folder out into the root directory, but what should I do with the index.php file which the processwire folder came with? I'm also guessing I should replace my sites original index.php file and set the processwire one as the default. But then what should I do with the old index and the other pages as well? Where do the pages I already have go?

Basically I'm unsure how I should  go about "integrating" processwire into my already made pages. The Basic Website Tutorial ("http://wiki.processwire.com/index.php/Basic_Website_Tutorial") instructs me to clean out everything but leave the default site template  and a few fields, but it seems like I would be adapting my site to that template. Instead, I wish to adapt processwire to the pages which I've already made. 

Tell me if I'm getting the workflow/structure wrong: I feel like the workflow/structure requires me to make each of the pages that I already have --  or an identical part of each page --  a template, and then in processwire spawn off a duplicate of each page in my website using the "new" button and selecting those pages as as a template. I feel like I'm kind of working backwards relative to the workflow, or I'm getting the workflow/structure wrong in my head.

Thanks for any help in advance! ​

Update: I've tried changing the "home" page to a template that is basically my original site's homepage, but I get the error:

Can't save page 1: /: Selected homepage template cannot be used because it does not define access. 

I read that ryan said the home, admin, and 404 page are essential. However I don't want the home's template style. What is the php code I need to include in my own homepage to start using it as a template?  

I've tried copy and pasting this from the original home.php template: 


<?php 

/**
 * Home template
 *
 */

include("./head.inc"); 

echo $page->body;

include("./foot.inc"); 
 

But I'm still getting the same message. 

Link to comment
Share on other sites

I'm on mobile so this will be short. Empty the content of the root folder, and put the files from the processwire folder there. Keep your old files on a sub folder in the server or only in your computer. You only need them for copy/pasting.

For now. Leave everything as is, and copy the contents of your old index to home.php. The result might surprise you.

Link to comment
Share on other sites

I've tried copy and pasting this from the original home.php template: 

What you want to do instead is wipe out what's in the /site/templates/home.php and replace it with your own. The template files included with the default profile as just an example. You don't have to retain anything about them if you don't want to. Though I do recommend using the same name for your home template (home.php) just to keep it simple. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...