Cakephp

Place javascript script for each individual element being loaded cakephp


Place javascript script for each individual element being loaded cakephp

In order to display an individual javascript file for each spesific element in Cakephp, in the layout put:

<?php echo $scripts_for_layout; ?>

Then in the element you can call the javascript file you need to include, like so:

Html->script("js_file", array("inline"=>false)); ?>

Published: 1st June 2016 by

Adverts