wiki | forum | trac | otrs | joomla | tech blog | mailman | bewelcome Branches: test.bw | alpha.bw | www.bw Participate: download | get involved

Your Hello World Applicationclick here

Say hello with html formated text from an extern fileclick here

Say hello with a simple database queryclick here

Say hello in many languages with a database queryclick here



Say hello with html formated text from an extern file

There will be much more to say then hello world and of course there will be a lot of html formated text which needs a lot of space. As we want to keep an overview of the functions in hello.view.php, all the html text is written in an extern file which is included in the view function.

the view function in the hello.view.php file looks like this:

hello.view.phpcomments
<?php

class HelloView extends PAppView {
private $_model;

public function __construct(Hello $model) {
$this->_model = $model;
}

public function hello() {
require TEMPLATE_DIR.'apps/hello/hello.php'; ;
}
all the html text is in the file: template/apps/hello/hello.php

}
?>

now we have to make the directory hello under the following path:

mkdir templates/apps/hello

There we create a file hello.php which with our output text:

hello.view.php
<?php
echo "<H1> hello</H1>";
echo "<b> world</b><br>";
echo "<i> be</i>";
echo "<H2> welcome! </H2>";
?>

Ask someone from the design team about how to deal with CSS stylsheets.
next step:

Say hello with a simple database queryclick here

Trac Customization: trac stylesheet
SourceForge.net Logo