My scenario is this:
In my /views/layout/default.ctp
<head> <?php echo $scripts_for_layout; ?> </head> <body> <?php echo $content_for_layout; ?>
In my /views/pages/home.ctp
<?php $this->Html->meta('keywords', 'my, keywords', array(), false); ?>
However, my problem is that even with $scripts_for_layout in my default.ctp and with boolean inline = false I still don't see the meta tag in my head , instead I just see them inline.
I am reviewing a script in which it echoes $scripts_for_layout before I make this HTML helper call, but should there certainly be an elegant way to do this?
Also note that calling the HTML helper is the first line of my views/pages/home.ctp
Edit - Yeah, I found my mistake. Here is someone else who has the same problem. With CakePHP 1.3, the HTML helper syntax changes a bit (and there is no backward compatibility for the syntax).
Apparently, there is a syntactical flaw in what I wrote in my view . This is the correct way to say boolean inline = false in version 1.3:
$this->Html->meta("keywords", "keywords, are, sweet", array("inline" => false));
Angad source share