HMVC+Dwoo combination possible? |
[eluser]cahva[/eluser]
Hi, Before I dig deeper to this problem, I wanted to ask if someone else has succesfully got these 2 babies work together. I installed latest HMVC and Dwoo parser. They both work by themself but when using modules::run('foo/bar') on the HMVC side, it wont work. If going to straight url http://mydomain/foo/bar, it will work and it goes through dwoo parser and works no problemo. ..also if I have this: Code: $this->parser->parse('someview',array('foo' => 'bar')); Code: $this->parser->parse('foo/someview',array('foo' => 'bar')); Oh yeah, and I'm using CI2.. PS. I just noticed that when I rename MY_Parser and use CI's own parser, it does the same: put the parsed content at the start of the script.
[eluser]Phil Sturgeon[/eluser]
The Parser will output content to the output buffer when the instance is finished. As you are running two instances of CI, the first instance will most likely run and dump the content to the browser. Try returning the parsed string instead of outputting it. Code: return $this->parser->parse('foo/someview',array('foo' => 'bar'), TRUE);
[eluser]cahva[/eluser]
Yep now it works, thanks. Now it doesnt work with straight url but that wont be a problem as these are used(and meant to be used) as partials. |
Welcome Guest, Not a member yet? Register Sign In |