mymotherland
mymotherland

Reputation: 8228

How to append style sheet with close element using zend?

I am using zend. When i use below code,

<?=  $this->headLink()
            ->appendStylesheet(BASE_URL . 'css/css.css');
 ?>

This outputs like below with out close element.

<link href="/ecomos3/css/css.css" media="screen" rel="stylesheet" type="text/css" >

so this one fails in w3 validation and getting "end tag for "link" omitted, but OMITTAG NO was specified"

i want the link tag should be

<link href="/ecomos3/css/css.css" media="screen" rel="stylesheet" type="text/css" />

How can i do it in zend ? Kindly advice on this.

Upvotes: 0

Views: 836

Answers (1)

vascowhite
vascowhite

Reputation: 18440

You need to specify the docType using the doctype helper

You can do it in your bootstrap if you wish:-

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected function _initDoctype()
    {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('XHTML1_STRICT');
    }
}

Or add this line to your config.ini file:-

resources.view.doctype = "XHTML1_STRICT"

Upvotes: 4

Related Questions