These are chat archives for PHPixie/Hotline

8th
May 2016
caseyhayes
@caseyhayes
May 08 2016 17:40
Yep, I am embarrassed to see such a simple solution. I, obviously, wasn't using that correctly. Thank you very much, Dracony!
caseyhayes
@caseyhayes
May 08 2016 18:31
Another question, is there a way to catch the html page generated from a controller & save to variable? I would like generate a page as usual using the templates, but send it through the email module instead of generating a page for a web browser.
Roman Tsiupa
@dracony
May 08 2016 20:10
of course
instead of returning a template container
call $container->render()
e.g.
$container = $this->template->get('app:greet');
$container->message = "Have fun coding!";
$html = $container->render();
caseyhayes
@caseyhayes
May 08 2016 20:12
That's great. Thanks again!
Roman Tsiupa
@dracony
May 08 2016 20:15
=) anytime
caseyhayes
@caseyhayes
May 08 2016 20:40
to clarify, was the example you gave above for 2.x?
Roman Tsiupa
@dracony
May 08 2016 20:45
no
3.x
you need for 2?
caseyhayes
@caseyhayes
May 08 2016 20:45
I do..I started a project in 2.x over a year ago & didn't have time to move it to 3.x. I want to, but I need to see it through as it is :-)
Roman Tsiupa
@dracony
May 08 2016 20:47
     $view = $this->pixie->view('hello');

    //Pass a variable to the view
    $view->message = 'hello';

    //Render the view 
    $html = $view->render();
caseyhayes
@caseyhayes
May 08 2016 20:48
simple enough. I have really enjoyed working with your framework. thank you for always lending a hand.
Roman Tsiupa
@dracony
May 08 2016 20:52
anythime =)