public function sections($key = null, $template = null)
{
if (!array_filter($this->sections)) {
return;
}
// The key does not match
if ($key && !isset($this->positions[$key])) {
return;
}
$matches = array();
foreach ($this->positions[$key] as $id => $section) {
if (isset($this->sections[$id])) {
$section['content'] = $this->sections[$id];
$matches[$id] = $section;
}
}
$this->matches = $matches;
if ($template === null) {
$template = 'block_sections';
}
include $this->getTemplate($template, $this->strFormat);
}