Version 3.4.
How does the view work? Isn’t it between controller and template?
I want to treat injections in template of CSS and JS, footers and headers.
Correct me if I’m wrong
My template
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Title</title>
<link href="/favicon.ico" type="image/x-icon" rel="shortcut icon"/>
<?php
echo $this->Html->charset('UTF-8');
echo $this->Html->meta('description', 'Description');
echo $this->Html->meta('viewport', 'width=device-width, initial-scale=1');
echo $this->fetch('meta');
echo $this->fetch('css');
?>
</head>
<body id="home">
<?php
echo $this->Html->script(['facebook.min.js','google.min.js']);
// code html here ...
echo $this->fetch('header'); // inject header
// code html here ...
echo $this->fetch('content'); // inject body
// code html here ...
echo $this->fetch('footer');
echo $this->fetch('script');
?>
</body>
</html>