Hi All,
I’m trying to remove a chunk that is at the end of my content on a page.
My code is:
$text = $content['introtext'];
$removeChunk = $modx->getChunk('BigGoldOleg');
$newtext = str_replace($removeChunk, '', $text);
I can str_replace any text in the content but nothing I have tried so allows the removal if the chunk. The chunk in question is HTML code to an image. I’ve tried removing the chunk as named. I’ve tried changing text contained within the chunk itself and nothing has worked so far.
Where am I going wrong?
I’m using Apache 2.0.54
PHP 5.2.0
modx 0.9.6