0

Thanks to burzum for helping configure TwigView with CakePHP.

I was able to use .tpl extention with CakePHP.

However, not everything renders perfect. My default.tpl layout file is as follows

<!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>

However, it renders below

<!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>

Helpers does not render. Please Help!

The link to my previous post is here

I am using predominant cakephp plugin.

0

1 Answer 1

0

Thanks to Alex the issue is resolved.

I got the answer from another post here.

We have the explicitly declare the helpers in the controller to make it work:

public $helpers = array('Html');
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.