public static function writeCondition($content, $condition = null, $global = false)
    {
        if (empty($condition)) {
            return $content;
        }
        return '<!--[' . $condition . ']>'
            . ($global ? '<!-->' : '')
            . ' ' . $content . ' '
            . ($global ? '<!--' : '')
            . '<![endif]-->';
    }