Upgrading from early version 3

In 2011 the structure of the PHP templates was changed to make it easier for people to upgrade when needed. Always ensure you are using the latest version of the templates by downloading them from the WPG Alliance site.

Older template sets (2010 and earlier) had four files:

  1. page_template: used by all webpages on your site
  2. config_template: for configuration settings that apply across the whole website
  3. menu_template: creates your left-hand website menu/s
  4. feature_template: for features on the homepage of your website (optional)

Older template sets had four templates working with the include via your site id

Newer templates (2011 onwards) have a slightly different file structure

Newer templates have six files: config, pages, settings site, menu, features and settings_features

Upgrading to the new template structure

Upgrading involves copying the existing settings of your site into the new template files and then overwriting the old files with the new.

  1. Download the latest template (from the WPG Alliance site) set and save the files somewhere locally so you can work on them.
  2. Open the config file currently being used by your website. Copy the values (the bits in quote marks) from the variables in this file and paste them into your local copy of settings_site.php. If you added additional information to $head in your config file (such as a local stylesheet), copy this additional information and insert it into $Extra_Meta
  3. If you are not making this change in a development environment, open the settings_site.php file and change the value of the variable $BodyBanner to have a single space between the quotes. This will remove the development banner from the top of the page.
  4. If the config file currently on your webserver is named something other than config.php, update your local config.php file to the same name.
  5. [If you use features] Open the features.php file currently being used by your website. Copy each feature out of this file and paste them into your local copy of settings_features.php If the features file currently on your webserver is named something other than features.php, update your local features.php file to the same name.
  6. Open the menu file currently being used by your website. Copy the menu items (the ULs and LIs) from here and paste them into your local copy of menu.php.If the menu file currently on your webserver is named something other than menu.php, update your local menu.php file to the same name.
  7. Make a back-up copy of the config, features and menu files from your webserver in case you need to revert back to them.
  8. From your local files, copy config.php and settings_site.php and paste them into the folder where your current config is. Do the same for features.php and settings_features.php and for menu.php.
  9. [If you use features] Edit the page where the feature is to appear. You need to include the call to the PHP function which displays the feature rotator. Insert the following line after include ('features.php'):

    printFeaturesOrig(); // ANU window homepage feature

    Note that there are now different types of features you can use. Please see PHP template for features for further details.

Updated:  5 March 2013/ Responsible Officer:  Director Marketing/ Page Contact:  Webstyle