Have an SS 2.4 site deployed. Client is running it out of <DOMAIN>/corporate/.
Also, using the static exporter, as they did not want to have the CMS directly connected to their production site.
All of the images that were added via the CMS, have "src" attributes that begin with "assets/...".
I would like to know if it's possible (without using a global search & replace on the static output directory) to get the CMS to render these as:
src="/corporate/assets/..."
Looked at a solution online which suggested adding an onBeforeWrite() method to the Page class, like so...
protected function onBeforeWrite() {
parent::onBeforeWrite();
$this->Content = str_replace(' src="assets/', ' src="/corporate/assets/', $this->Content);
}
However, this did not seem to have any effect when I re-ran the static exporter.
Has anyone come up with a solution to this type of problem before?
Thanks for any suggestions!