Adding New Pages
At some point, to add new content into your member's area or to extend existing membership features, you will need to add new pages. PM Premium Admin Panel has a very convenient tool to add new pages. This tool can be found at "Admin Panel" -> "Templates" -> "Add New" screen. In essence, each template consists of four properties: "Type", "Name", "Location" and "Body". Type defines the access level for a template, name is a unique identifier for each template and location defines the directory in which the new template should be placed. "Body" will be the contents of the your new page.
A template type defines its access level. It is essential to choose a correct access type for each template to keep your member's area secure. There are four different template types:
- Show: public page
If your new page will be available to all visitors including members and non-members, then this kind of pages should be constructed using "Show" type. Good examples for this type is public search forms and profile pages. To promote your site, you may allow non-members search member database. In that case, there is no assumption that a visitor who is seeing the search form or user profile is a member, therefore a "show" template type would be used.
- Member: login required page
If your new page will be available to only current members, then this kind of pages should be constructed using "Member" type. If you build additional modification forms for your users, since the information should only be modified by the user, "member" template type should be used.
Approved: approved member only page
If your new page will be available to only approved members, then the page should be constructed using "Approved" type. User approval can be done automatically or using Users -> Approval section of your admin panel.
Admin: admin page
If a particular page will be available to only administrator, then the page should be constructed using "Admin" type. Admin account is the account created using "admin" login name. Login name of the admin account can be changed from Preferences -> Advanced page of your Admin Panel.
To make it easier to find and edit templates, each new template should have an easy to remember name. A template name should not include space or special characters such as "&", "/", "=" in it. As a convention, it is recommended to use all lowercase and short names for your templates.
When you create a template, PM Premium actually creates an HTML page under templates directory. To make it easier to find a particular template, there are multiple folders under your template directory. You can save your new templates under one of them. For instance, if you are creating a secondary profile page, this profile can be placed under "profile" template directory. This directory structure also make it easier to find templates to edit in Admin Template Editor.
|/common/||Most commonly used templates. (such as header template)|
|/member/||Member area templates.|
|/profile/||Profile page templates.|
|/search/||Search and listing templates.|
|/blog/||Blog related templates.|
Content of your new template should be inserted into body textarea. You can use HTML code and PM Premium tags in the body. If you would like to create your page with an HTML editor like FrontPage, make your page there and copy the source code of it into the body textarea box.
Recommendations for a new template body:
Instead of repeating same code in a new template, include other templates using %%TEMPLATE:templatename%% tag.
Be aware not to include %%ID%% database field and other private user information in "Show" type of templates.
When linking to other pages, add &session=%%session%% to the end of the URLs. This way your link will still work if the visitor's cookies are disabled.