Reputation: 178
<meta charset="utf-8">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
I try this
$this->Html->meta(array('charset'=>'utf-8'));
$this->Html->meta(array('content'=>'IE=edge,chrome=1'), array("http-equiv" => X-UA-Compatible));
$this->Html->meta("viewport", array("content" => width=device-width,initial-sacale=1.0));
$this->Html->meta("description");
$this->Html->meta("author");
but it not working...............
I am a new for cakephp.... so please help me to solve this problem...
Upvotes: 3
Views: 1566
Reputation: 1
<?= $this->Html->meta(
false,
'ie=edge',
['http-equiv' => 'x-ua-compatible']
);
?>
.... resulted
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
Upvotes: -1
Reputation: 31749
try this -
echo $this->Html->meta(
'keywords',//name
'enter any meta keyword here'//content
);
so for this -
<meta name="viewport" content="width=device-width, initial-scale=1.0">
echo $this->Html->meta(
'viewport',//name
'width=device-width, initial-scale=1.0'//content
);
docs for details and other options.
for charset
- echo $this->Html->charset('ISO-8859-1');
try -
echo $this->Html->meta(array('name' => 'viewport', 'content' => 'width=device-width, initial-scale=1.0', 'http-equiv' => "X-UA-Compatible"));
Upvotes: 6