PHP Classes

File: examples/templateref.php

Recommend this page to a friend!
  Classes of philippe thomassigny   DomCore   examples/templateref.php   Download  
File: examples/templateref.php
Role: Example script
Content type: text/plain
Description: Example script
Class: DomCore
Base library for PHP Web applications
Author: By
Last change: Update of examples/templateref.php
Date: 4 months ago
Size: 1,877 bytes


Class file image Download
// have to put this into a php block or the <?xml will be put as a PHP syntax error on extended code escape
echo '<?xml version="1.0" encoding="UTF-8"?>';
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="" xml:lang="en" lang="en">
  <!-- Generic browser family -->
  <title>DomCore Demos, a WebAbility&reg; Network Project</title>
  <meta http-equiv="PRAGMA" content="NO-CACHE" />
  <meta http-equiv="Expires" content="-1" />

  <meta name="Keywords" content="DomCore, templates, WebAbility" />
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta name="Charset" content="UTF-8" />
  <meta name="Language" content="en" />
  <link rel="stylesheet" href="/skins/css/domcore.css" type="text/css" />


<div class="container">

<a href="../index.html" class="back">&#xAB; Back to the index</a><br />
<br />

<h1>\core\WATemplate references example</h1>


// We assure any DomCore library we call will be automatically loaded
include_once '../include/__autoload.lib';

setlocale(LC_ALL, 'es_MX.UTF8', 'es_MX', '');

$template = <<<EOF
%-- This is the example of a template --%






$temp = new \core\WATemplate($template);

$data = array(
'title' => 'Blue Martini recipe',
'content' => '1 oz. Stoli Limonnaya Vodka<br />
1 oz. Stoli Razberi Vodka<br />
splash Sour Mix<br />
dash Curacao<br />
<br />
Garnish with lemon twist<br />'

$temp->metaElements($data, false, true);



<br />
<br />
<br />
<br />

<a href="../index.html" class="back">&#xAB; Back to the index</a><br />