2011-11-21 3 views
0

젠드를 사용하고 있습니다. 아래 코드를 사용할 때,zend를 사용하여 close 요소로 스타일 시트를 추가하는 방법은 무엇입니까?

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

다음과 같이 출력이 바르게됩니다.

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

그래서이 사람은 " end tag for "link" omitted, but OMITTAG NO was specified는"

내가 링크 태그가해야 할 W3 검증 및 얻는 데 실패

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

어떻게 내가 그것을 젠드에서 할 수 있습니까? 이것에 관한 조언.

+0

Doctype을 xhtml로 설정해야합니다. – vascowhite

+0

@vascowhite 를 작성하십시오. – mymotherland

답변

4

당신은 사용하여 문서 타입을 지정해야 doctype helper

원하는 경우 당신은 당신의 부트 스트랩에서 작업을 수행 할 수 있습니다 -

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

또는 당신의 config.ini 파일에 다음 행을 추가합니다 -

resources.view.doctype = "XHTML1_STRICT" 
+0

감사합니다. 매우 유용합니다. – mymotherland

관련 문제