php - How to render code in phalcon view -
$view->start(); $view->render("products", "list"); $view->finish();
above show how render file, wonder possible render string/code method?
$view->start(); $view->renderstring("<?php echo $this->url->get('users/list') ?>"); $view->finish();
you can use 'setcontent' set view content:
$view->setcontent('<h1>hello</h1>');
but functions receives final content view. example gave correct use be:
$output = 'the link is: <a href="'.$this->url->get('users/list').'">link</a>'; $this->view->setcontent( $output ); echo $this->view->getcontent();
Comments
Post a Comment