Editing Templates
If you are building a new membership site, you have two options: Use the default design or Make your own design. If you would like to choose the quickest way, edit existing templates and make small changes on them. To make customization easier for you, we assigned most of the design code to the header and footer templates. By editing header and footer, you should be able to integrate the membership area design with your own site design and enable/disable features under half an hour. On the other hand, if you have time and energy for it, feel free to redo all templates from scratch with your own taste.
If you already like the default navigation and design, it would take less time and effort to do quick and easy changes and be done with it. In this tutorial, you will learn how to do this. Making all templates from scratch will be covered on the next chapter: Advanced Customization.
How to Find a Template for a Particular Page:
If you are looking for a particular page, Template Reference page has a list of all templates and their description. If you have just installed PM Premium and would like to customize it, read Step by Step Guide for Template Customization.
How to Edit a Page:
There are two types of pages:
1. HTML forms and links: These pages are simple HTML pages and they can be edited using your favorite HTML editor. They are created during installation and copied to the directory you have specified in the last step (that asks for a location for sample HTML forms).
- index.html: Sample forms for login, lost-password, search and listing. Sample links for registration form, search, listing and admin pages. You can copy the forms and links from this page into you homepage or any other page in your site.
- register.html: Sample registration form. If you change your database fields, you can update this form with the registration form given at "Database Wizard Step 2". You may also remove any unnecessary fields from the form as you would like. If you keep your registration form small and easy-to-fill, you will get more people to sign-up!
- search.html: Sample search forms to show what kind of searches PM Premium can accomplish. A detailed tutorial is available here.
-
login.html: A sample login form that can be copied to your homepage.
2. Template Based Pages: These pages are parsed by PM Premium to produce output with dynamic data in them. They are regular HTML pages as well, and you can edit them with your favorite editor. However these pages are not supposed to be seen directly. For instance, your members will not see your "update info form" athttp://www.yourdomain.com/members/cgi/templates/member/t_modify.htm, they will see it athttp://www.yourdomain.com/members/cgi/pm.cgi?action=modify. When they call pm.cgi?action=modify page, PM Premium will first parse "templates/member/t_modify.htm" and produce an output that includes data for that particular user.
How to Include Member Data in a Page:
You may include member information in the templates using template tags. Tags have "%%" characters at the beginning and at the end. For example, if you have a "graduation year" field in your membership database, you can print that data out by using %%graduation year%% tag in any of the templates. In addition to the database fields. There are also special tags such as %%AGE%%(find user's age using entered birth date), %%number of members%%(total number of members in the database), %%FAVORITES:,%%(list of favorites separated by commas between each login name), %%PERL: print localtime()%%(Perl code that prints out current time - for advanced users) or %%INCLUDE:http://www.interlogy.com%%(include an external URL inside the page). A list of special tags and descriptions can be found at Special Template Tags Reference.




