CodeIgniter Forums
Dwoo (Phil's edit) - How to use? - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Dwoo (Phil's edit) - How to use? (/thread-27239.html)

Dwoo (Phil's edit) - How to use? - El Forum - 02-04-2010

I'm thinking of using Dwoo because Dwoo supports Template Inheritance, similar to the way Django does it (well sort of) and I am working through the getting started tutorials found at:

However I am stuck at this bit and how to use Dwoo's functionality as I've tried $this->Dwoo->something() but this does not work.

The example says:

// Retrieve your data using whatever means you use
$articles = getMyArticles();

// Loop over them
foreach($articles as $article) {
    // Output each article using their data (assuming it is an
    // associative array containing "title", "content", "author"
    // and "date" keys)
    $dwoo->output($tpl, $article);

// View

But I can't use this->dwoo->output()

public function dwoo_test()
        $data['message']     = 'This is dwoo!';
        $data['a']            = 'ABC';
        $data['b']            = 123;
        $articles = array("Article 1", "Article 2", "Article 3");
        foreach($articles as $article):
            $output = $this->parser->parse('test', $data, TRUE);
        print $output;        

The above either gives me an error message or I just get "Article 3" -- even though it should list them all.

I can't seem to use any of the Dwoo functionality such as $dwoo->get("code_snippet.tpl", $params);

I followed Phil's instructions but can't seem to do very basic Dwoo functionality.

Dwoo (Phil's edit) - How to use? - El Forum - 02-09-2010

I've decided not to use Dwoo; I'm finding it hard to use/implement and will just use simple PHP like templates.