Talk:Templating
From KnowledgeTree Community
For any other Noobs out there (like me) - don't know if something has changed since this demo was written, but this didn't work on my v3.5.2 Knowledge Tree instance. I had to add code to instantiate and invoke the do_main method, as in:
$oDispatcher = new hello; $oDispatcher->dispatch();
This had to follow the class declaration.
This rendered the content w/in the Knowledge Tree 'frame' (ie, between the header & footer, and w/in the borders of the main part of the page.
To get it to render outside the context of the 'frame', I called do_main() vs dispatch().
My apologies if this is common-sense to everyone else, but I lost almost an hour trying to get this example to run - nothing in my do_main method ever showed up. (until I included the instantiation and call code)
del.icio.us
reddit

