Re: [svn-commits] r8478 - r3/trunk/vortex/staticcontent
Jean-Christophe Michel <jc.michel-/aRvmaKoZxNWk0Htik3J/[email protected]> Sat, 02 Apr 2005 14:12:08 +0200
| Newsgroups | gmane.comp.lib.binarycloud.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi bas, In your last commit I think you made some overingeneering. I use staticcontent here with simply a completely commented overrideTemplateInstance(); no need to get another instance since the one we have in Node is already unique :-) Try it. [email protected] wrote: > Author: bas > Date: 2005-04-02 11:56:53 +0100 (Sat, 02 Apr 2005) > New Revision: 8478 > > Modified: > r3/trunk/vortex/staticcontent/DisplayWikiText.php > Log: > change to accommodate new TemplateManager > > Modified: r3/trunk/vortex/staticcontent/DisplayWikiText.php > =================================================================== > --- r3/trunk/vortex/staticcontent/DisplayWikiText.php 2005-04-01 22:06:57 UTC (rev 8477) > +++ r3/trunk/vortex/staticcontent/DisplayWikiText.php 2005-04-02 10:56:53 UTC (rev 8478) > @@ -12,6 +12,7 @@ > bc_include_once('binarycloud/node/Node.php'); > > include_once('binarycloud/conf/Conf.php'); > +include_once('binarycloud/node/TemplateManager.php'); > // }}} > // {{{ class DisplayWikiText > /** > @@ -79,15 +80,21 @@ > * @todo Maybe we should have a real Template state stack after all. > */ > function overrideTemplateInstance() { > + $manager =& TemplateManager::getInstance(); > + $array = $manager->createTemplateObject(); > + $this->template_id = $array['id']; > + $this->template =& $array['reference']; > + > + > // assign static template instance to node > - $this->template =& new Template(); > +// $this->template =& new Template(); > > // register block function to add resources from any template > $Resources =& Resources::getInstance(); > + // register block function to add resources from any template > $this->template->register_block("addResources", array(&$Resources,'addResources'),FALSE); > // register function to access resources (only top template will use this) > $this->template->register_function("getResources", array(&$Resources,'getResources'),FALSE); > - > } > // }}} > > @@ -196,7 +203,7 @@ > } > } > } > - > + print_r($this->settings['insert_rules']); > // Add new rules, always at the beginning of the rule set. > if (isset($this->settings['insert_rules'])) { > foreach ($this->settings['insert_rules'] as $rule) { -- Jean-Christophe Michel _______________________________________________ dev mailing list dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected] http://lists.binarycloud.com/mailman/listinfo/dev