I am trying to acomplish that, but how can i "tweak" the render function and the routing to do this?
Please, wich is the best way to do this?
/**
* Creates a CMS page from a static page and configures it.
* @param string $url Specifies the static page URL.
* @return \Cms\Classes\Page Returns the CMS page object or NULL of the requested page was not found.
*/
public function initCmsPage($url) {
$router = new Router($this->theme);
$page = $router->findByUrl($url);
if (!$page) {
return null;
}
$p = new Page();
$p->markup = $page->content_html;
return $p;
}
My Router return actually a Eloquent Model
$page = $router->findByUrl($url);
I copy the Static Pages Controller and tried to do this but does not works :( any clue?