Search code examples
octobercmsoctobercms-plugins

In Octobercms, Can someone tell me how to get a CMS page parsed content?


Can someone tell me how to get a CMS page parsed content ( html content without any {% component code %} or {% partial code %} ) in a Plugin boot method ?

Thanks


Solution

  • Okay I find out.

    There is an event cms.page.render where I can access page content.

    Event::listen('cms.page.render', function (\Cms\Classes\Controller $controller,
    $pageContents) {
    });
    
    

    Here $pageContents has what I needed.