I'm trying to get the rendered output of a page in a custom module.
In my custom Process module, I have the following:
public function ___execute() {
$page = $this->pages->get(1);
$page->of(true);
$op = $page->render();
return "Hello World";
}
An exception is thrown:
The srcset functionality is used liberally to generate the desired output of a page.
Any suggestions on what I can do to avoid the srcset error?
Edit 1: using MarkupSrcSet module: https://processwire.com/modules/markup-src-set/ - which adds the srcset method in it's ready() function. Is it possible to boostrap this prior to calling the render() function?
Edit 2: bypassed the issue specific to the srcset above, it further appears that rendering output is problematic when using MarkupRegions. Title updated and tagged accordingly. Can anyone provide insight into how to retrieve the output of a page using markup regions in the template layer?