If we want to have content easy to modify on pages or page with option to turning off, we can use Content Module system for it and call only One of the box which we want and print it in our Template where we want.
We can do through this steps:
Create new directory: includes/modules/content/everywhere/
In template_top.php
Before or just after:
Add:
if ($oscTemplate->hasContent('everywhere')) {
$oscTemplate->getContent('everywhere');
}
In osc_template.php
Add (before getContent method)
function getOneContent($title){
return $this->_content['everywhere'][$title];
}
Modify:
function addContent($content, $group, $contentname = false) {
if($contentname){
$this->_content[$group][$contentname] = $content;
}else{
$this->_content[$group][] = $content;
}
}
And when you creating new module content in execute funtion do it like that:
$oscTemplate->addContent($template, $this->group, $this->title);
After all of this it's possible to print content where we want like that:
echo $oscTemplate->getOneContent('Custom info');