I found this topic which does work for text,
http://www.silverstripe.org/community/forums/customising-the-cms/show/23600
which gave this code
if($this->Content) {
$hasLocation = stristr($this->Content, '$MyVariable');
if($hasLocation) {
$content = str_ireplace('$MyVariable', $value, $this->Content);
return array(
'Content' => DBField::create_field('HTMLText', $content),
);
}
}
return array(
'Content' => DBField::create_field('HTMLText', $this->Content),
);
}
Which does work.
My Question is, can this be repurposed to inject HTML code instead of text? I want to be able to make shortcodes for a tabbed area of content, but the shortcodes don't nest so that's not an option.
Thoughts?