2013-11-24 2 views
0

burzum 덕분에 TwigView를 CakePHP로 구성하는 데 도움이되었습니다.CakePHP TwigView가 올바르게 렌더링되지 않습니다.

CakePHP에서 .tpl 확장을 사용할 수있었습니다.

그러나 모든 것이 완벽하게 렌더링되는 것은 아닙니다. 그러나

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> 
<html> 
    <head> 
    {{ html.charset() }} 
    <title>{{ 'CakePHP: the rapid development php framework'|trans }}: {{ title_for_layout }}</title> 
    {{ html.meta('icon') }} 
    {{ html.css('cake.generic') }} 
    {{ scripts_for_layout }} 
    </head> 
    <body> 
    <div id="container"> 
     <div id="header"> 
      <h1>{{ 
       html.link('CakePHP: the rapid development php framework'|trans, 'http://cakephp.org') 
      }}</h1> 
     </div> 
     <div id="content"> 
      {{ session.flash() }}{{ session.flash('auth') }} 
      {{ content_for_layout }} 
     </div> 
     <div id="footer"> 
     {{ 
      html.image('cake.power.gif', { 
       'alt': 'Powered by CakePHP'|trans, 
       'url': 'http://cakephp.org' 
      }) 
     }} 
     </div> 
    </div> 
    </body> 
</html> 

를 다음과 같이 내 default.tpl 레이아웃 파일은 렌더링하지 않습니다

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> 
<html> 
    <head> 
    <title>CakePHP: the rapid development php framework: Testing</title> 
    </head> 
    <body> 
    <div id="container"> 
     <div id="header"> 
      <h1></h1> 
     </div> 
     <div id="content"> 
      <div class"alert alert-info>Hello There!</div> 
     </div> 
     <div id="footer"> 
     </div> 
    </div> 
    </body> 
</html> 

도우미 이하 렌더링입니다. 도와주세요!

내 이전 게시물에 대한 링크는 내가 predominant cakephp plugin을 사용하고 here

입니다.

답변

0

Alex 덕분에 문제가 해결되었습니다.

다른 게시물 here에서 답변을 얻었습니다.

우리가 명시 적으로 작동하도록 컨트롤러에서 헬퍼를 선언 :

public $helpers = array('Html'); 
관련 문제