public function filter(&$text)
    {
        $data = (object) $this->getTemplate()->getData();

        if (isset($data->styles))
        {
            foreach($data->styles as $style)
            {
                $method = 'modChrome_'.$style;

                // Apply chrome and render module
                if (function_exists($method))
                {
                    $data->module->style   = implode(' ', $data->styles);
                    $data->module->content = $text;

                    ob_start();
                    $method($data->module, $data->module->params, $data->attribs);
                    $data->module->content = ob_get_contents();
                    ob_end_clean();
                }

                $text = $data->module->content;
            }
        }

        return $this;
    }