Support

Templates

ppSD2 Product Manual » Integration » Templates

ppSD2 comes with a series of preset templates designed to "mold" into any website layout.

Overview

Templates are rendered as follows:

  • Header
  • Specific Template
  • Any sub-templates
  • Footer

The "specific template" refers to the the page being called, such as the login form or the registration form. In the case of some templates, sub-templates are included, such as form fields on a registration page.

Best Practices

Absolute Paths

Use absolute paths for images, style sheets, and javascript. This means starting paths with a forward slash.

Bad practice:

<img src="images/logo.png" border="0" alt="Logo" />
<link href="data/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="functions/general_functions.js"></script>

Good practice:

<img src="/images/logo.png" border="0" alt="Logo" />
<link href="/data/style.css" rel="stylesheet" type="text/css" />
<script language="javaccript" src="/functions/general_functions.js"></script>

Including PHP

You can include and run your own PHP on any template by adding the following code:

<ppsd2_include>/full/server/path/to/file.php</ppsd2_include>

PHP Headers and Footers

You can also take this one step further and "include" your own PHP files as your header and footer. To do this, go to "Settings > HTML Templates" and edit the "Header" and "Footer" template.

Recommended Code: Header

Please this within the <head> of your page:

<link href="/ppSD2/style.php" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/ppSD2/functions/calgen.js"></script>
<script type="text/javascript" src="/ppSD2/functions/ajaxCalls.js"></script>

Recommended Code: Footer

Place this code above the </body> tag:

<div id="ppsd2_loading"><div id="ppsd2_loading_pad">Loading</div></div>
<div id="ppsd2_error"><div id="ppsd2_error_pad">
  <span id="ppsd2_error_content"></span>
  <span>(<a href="#" onClick="closeDiv('ppsd2_error')">hide</a>)</span>
</div></div>

E-Mail Templates

Much like HTML templates, e-mail templates also have a standard header and footer between which the template being called is placed.

If you wish to send e-mails in HTML format, click on "Settings" and set the "HTML E-Mails?" option to "Yes" under "Basic System Options".

Restoring Templates

You can restore your templates at any time by clicking on "Restore Template" when editing a template.

If the "Restore Template" feature doesn't work, you can find all templates by clicking here.

Caller Tags

Most templates allow you to include "Caller Tags", which are bits of information that are replaced with a user's actual information. Therefore, placing %first_name% on an outing e-mail will replace that caller tag with the user's actual first name.

A list of available caller tags is available on a template-by-template basis when editing the template.

Last updated on 12 August 2011 4:45pm

Discussion

Vote Up
0
Vote Down
11 May 2012 3:42pm by omtest5 [PowerUser!] (0)
Comment hidden (show)

Post a Comment

Please note that only comments involving constructive ideas will be approved.

This website does the Banana Dance!