This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
beluca
php in layout:
function onStart()
{
$rainLabPageContent = $this->components->????;
// Code to manipulate $rainLabPageContent
}
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
1-3 of 3