beluca
beluca

php in layout:

function onStart()
{
    $rainLabPageContent = $this->components->????;

    // Code to manipulate $rainLabPageContent
}
pxpx
pxpx

Hey Ben,

Just had a very quick look at this after you left IRC, and its not the greatest solution, but if you use the onBeforePageStart method you can manipulate the contents markup prior to outputting in the layout.

This only works when using static pages though from my first glance at this.

<?php
    function onBeforePageStart()
    {
        $this->staticPage->pageObject->markup = str_replace('REPLACE', 'WITHTHIS', $this->staticPage->pageObject->markup);
    }
?>

Just a very simple example above, you could place this in our layout but you would need this on each layout that outputs the page content.

Hope this helps.

Last updated

beluca
beluca

Perfect! Thank you much, that's exactly what I was looking for.

1-3 of 3