Example:Module
From Antares Wiki
Antares Default Module
The default module that is provided with Antares, is named ' home'. It is a brief example of what can be done in order to control the flow of the project. Please direct any questions towards this example to the forums at the Examples Forum.
<?php $doc = Control::getControl(); if($doc->isHttp) { /* * This will provide the desired code for normal HTTP transactions. */ $doc->loadTemplate(htmlDir ."template.html"); // Loads a desired template into the document $doc->setTitle("HTTP Transaction"); // Sets the desired title } elseif($doc->isAjax) { /* * This will provide the desired code for 'Ajax' transactions */ print 'Web "2.0"'; } else { throw new Exception("Unknown transaction type requested"); } ?>
