ClimbingHiking HobbiesStudiesSite MapContact


Hobbies
Visit the Website!

" Easy Webpage Maintenance with PPWizard"
(April, 2002)

Maintaining a web site is very simple with or without a preprocessor with only a few pages. However, as the web site grows, maintenance also grows. In fact, I'd say before I found out about this preproccessor, I spent at least 80% of my time in maintenance. The biggest chore by far was the cut and paste task for changes affecting all pages. For example, if I changed the image at the top of my page, I then had to open each page in my HTML editor and manually delete the old image file and insert the new one....20 times for 20 pages.

I am very new to making websites with basic knowledge of HTML, CSS, and some javascript, so what I explain of how I use PPWizard should not be taken over those instructions given by Mr. Bareis, the author of PPWizard. My goal is simply to help explain in the words of a novice how to get started with the program to possibly help you through any questions I had as I started. If you do get confused, Mr. Bareis doesn't mind your emailed questions. He quickly helped me every time.

What does PPWizard do?

PPWizard basically saves you oodles of time by doing all the cut and paste work of web site maintenance for you. All you do is make a template sheet listing items, such as code for a footer, common to the pages of your site. In this template, label each item, and substitute that label into your HTML code in place of the original code. Then, when you run PPWizard, it looks through the HTML and labels on your page and when it comes to a label, it goes to the template sheet and replaces the label with the code. Now, every time you create new pages, instead of rewriting the full HTML code, you just type in the label and the process it. Also, when you make any changes, you only make a change to the template and then let PPWizard reprocess all the pages and make changes for you! This is extremely efficient.

Getting Started With PPWizard

The fastest and most effective way to learn is hands-on, so I've created a short tutorial to get you started.

  • 1. Create two folders on your C: drive named "SourceFolder" and then another named "OutFolder".
  • 2. Open up your HTML editor (Notepad if you don't have one), create a basic HTML document, and type a short paragraph in the body section of your code. Now save this page as "NewPage.it" into "SourceFolder".
  • 3. Open up a new blank document page and type this code exactly as seen (add spaces and keep text all on one line): #define ThanksPPW PPWizard will save me time.. Save this page as "Standard.it" in your "SourceFolder".
  • 4. Now, go back to your "NewPage.it" and in your paragraph somewhere, type in this label: <$ThanksPPW>. On the very top line of the page type: #include Standard.itand then save the changes. You now have an HTML-label page "NewPage.it" and a template page, "Standard.it", in your "SourceFolder" and an "Outfolder". You are ready to process!
  • 5. Right click the Start button and select "Command Prompt HERE". Then, at the DOS Command Prompt, type in this:regina ppwizard C:\SourceFolder\NewPage.it /output:C:\OutFolder\NewPage.htm (this says,"go to my "NewPage.it" file in the SourceFolder, process it, and output a file named "NewPage.htm" in my OutFolder). There are easier commands than this, but using this method is much easier later as explained in the "Using PPWizard with a Directory Tree".
  • 6. Now you can open up your new web page with your browser (Internet Explorer, Netscape...). You will see that instead of "<$ThanksPPW>" in your page, you will see "PPWizard will save me time.".
  • 7. Congratulations! You just learned how to use the #define and #include tags by defining your code with a label and including the template for processing your page. Play around with some more codes, labels, and create new pages. Then see how changing the template changes all your pages! Make sure to tell Mr. Bareis thanks for helping you out.

Using PPWizard with a Directory Tree

When you create a web site, you usually have a heirarchy of folders beginning with a homepage, or index.htm, and several subfolders and possibly sub-sub folders. So how do you use PPWizard to process for a heirarchy? While I'm sure there are advanced options to further automate the process I'll explain, this is the level I can understand right now and may be a good place for you to begin too.

Remember the long command you typed in at the DOS Prompt in the exercise before (step 5)? This is the key to easy maintenance. You had two folders, a SourceFolder and an OutFolder. In these two folders you create two directory trees, one for storing all your ".it" files with HTML and labels for processing, and another to receive the processed "pure" HTML pages which you use to upload to your web host server.

Let say you have a menu item in your navigation bar for Scuba Diving. In this Scuba Diving section, you have three different pages, an information page, picture gallary page, and a links page. Each of these pages will have two things in common, they are in the same folder with the same file extention (.it or .htm). Now, imagine you want to change the header of these pages from "Scuba Experience" to "Scuba Diving Experience". If you made a label for this code, then you simply change the code on the template page. Then, instead of saving changes to each individual page, you use this DOS Prompt command: regina ppwizard c:\SourceFolder\ScubaFolder\*.it /output:c:\OutFolder\ScubaFolder\*.htm. This tells PPWizard to go into the SourceFolder, then the ScubaFolder and process all files with ".it" extention. This is all three of the scuba pages. PPWizard will then "/output" the processed files into the folder you specify, which should the the identical folder of the OutFolder directory tree (ScubaFolder) and to give them the extention ".htm". It may not seem that big of a deal with three pages, but with a website of 5 catagories, each with 5 pages the value of the processor is incredible.

What if you only want to change one of these files in the SubaFolder? Simple, instead of using a "*.it" and "*.htm" in the above command, you simply fill in the file name such as "scubalinks.it" and "scubalinks.htm".

Well, I've taken you to the extent I've discovered so far. I'll add more information as I learn. Best of luck to you!
Take Care,
Steve.


 Hobby Page   ||   Next Article: "Acrylic Painting in the Art Gallery" 
StephenWilliamson.com is maintained with Eversoft's 1st Page 2000 (freeware) and the PPWizard preprocessor (freeware)
. Email:teveman@medscape.com