This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Xitara
Xitara

Hi, I want to render a CMS-page in a plugin with php into a variable. The following code renders the page to a variable but breaks the output in browser (empty body)

$controller = new Controller;
$theme = Theme::getActiveTheme();
$page = Page::load($theme, $config['page']);
var_dump($controller->runPage($page, false));

same with

var_dump($controller->runPage($page, false));

and

var_dump($controller->renderContent($config['page']));

and

Controller::render($config['page']);

How can I render a page in php without breaking page-output?

thx4hlp

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.