-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started
loranger edited this page Dec 27, 2010
·
7 revisions
Download the tao library using git clone git://github.com/loranger/tao.git.
Include the tao require file in your new project.
Instanciate a new page and create tao nodes.
Add the tao node to the current page, et voilà !
The output html webpage will be automatically rendered at the end of the file.
Example :
<?php
require_once('./tao/require.php');
Page('xhtml');
Page()->setTitle('Welcome home');
$h1 = new tao('h1');
$h1->addContent('My Title is awesome !')->setStyle('color: red;');
Page()->addContent( $h1 );
?>Will render :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Welcome home</title>
</head>
<body>
<h1 style="color: red;">My Title is awesome !</h1>
</body>
</html>