UNL Templates PEAR Package

From Web Developer Network Wiki
Jump to: navigation, search

The UNL Templates are now available as a PHP PEAR compatible package.

To install the templates, you must have a server running PHP and PEAR installed and updated to the latest version. Once you have that, simply run

pear upgrade PEAR
pear channel-discover pear.unl.edu
pear install --alldeps pear.unl.edu/UNL_Templates-beta

Currently the package assumes you have an existing /wdn/templates_3.0/ or /ucomm/templatedependents/ directory existing and synchronized on your server. See the UNL Templates on other servers documentation for more information.

Once you have the UNL_Templates package installed, try creating a page like this:

require_once 'UNL/Templates.php';
UNL_Templates::$options['version'] = 3;
$page = UNL_Templates::factory('Fixed');
$page->titlegraphic     = '<h1>Hello UNL Templates Test</h1>';
$page->maincontentarea  = '<p>Testing the main content area.</p>';
echo $page->toHtml();

If you have any problems, contact Brett Bieber.

API Documentation

API Documentation is available at http://pear.unl.edu/docs/UNL_Templates/

Personal tools