protected function renderNest(Model $model, $isExpanded = false)
    {
        // Get the dom id.
        $domid = $model->getDomid();
        if ($domid !== '') {
            $domid = 'id="' . $domid . '"';
        }

        // Are we expanding this one?
        if ($isExpanded === true) {
            $style = '';
        } else {
            $style = 'khidden';
        }

        return str_replace(
            array(
                static::MARKER_STYLE,
                static::MARKER_MAIN_FUNCTION,
                static::MARKER_DOM_ID,
            ),
            array(
                $style,
                $model->renderMe(),
                $domid,
            ),
            $this->getTemplateFileContent(static::FILE_NEST)
        );
    }