implement including method resolving #INCLUDE tag

This commit is contained in:
Manuel Raynaud
2013-02-19 13:07:15 +01:00
parent 99b428fb5c
commit f9f2b71f22
2 changed files with 4 additions and 4 deletions

View File

@@ -131,8 +131,6 @@ class Parser implements ParserInterface
{ {
$this->loadParser(); $this->loadParser();
echo \Thelia\Model\ConfigQuery::read("alfred", "dupont");
return $this->content; return $this->content;
} }
@@ -176,7 +174,7 @@ class Parser implements ParserInterface
$this->tpex->init($this->container->get("request"), $this->container->get("dispatcher"), $content, THELIA_TEMPLATE_DIR . rtrim($this->template, "/") . "/"); $this->tpex->init($this->container->get("request"), $this->container->get("dispatcher"), $content, THELIA_TEMPLATE_DIR . rtrim($this->template, "/") . "/");
$this->tpex->setLogger(Tlog::getInstance()); $this->tpex->setLogger(Tlog::getInstance());
$this->tpex->execute(); $this->setContent($this->tpex->execute());
} }
protected function openFile(Request $request) protected function openFile(Request $request)

View File

@@ -9,6 +9,8 @@ and open the template in the editor.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head> </head>
<body> <body>
<div>TODO write content</div> <div>TODO write content
#INCLUDE "include1.html"
</div>
</body> </body>
</html> </html>