cphalcon
cphalcon copied to clipboard
[1.3.3-1.3.4]assets output duplicate
centos 6.6 64bit cphalcon 1.3.4 php 5.6.2 on Controller
$this->assets->collection('header')
->addCss('css/share.css')
->addCss('css/test.css')
->addJs('xx.js');
var_dump($this->assets->outputJs('header'));exit;
will output:
<script type="text/javascript" src="css/share.css"></script>
<script type="text/javascript" src="css/test.css"></script>
<script type="text/javascript" src="xx.js"></script>
I thought it was output like this:
<script type="text/javascript" src="xx.js"></script>
and when
var_dump($this->assets->outputCss('header'));exit;
it was output like this:
<link rel="stylesheet" href="css/share.css" type="text/css" />
<link rel="stylesheet" href="css/test.css" type="text/css" />
test on 1.3.3,same problems
Where is the duplicate? For me it looks fine. Or i am wrong? You add two css and one js files. In the output, the links are to be seen.
@swen100 thx for reply.
I thought it was output like this:
<script type="text/javascript" src="xx.js"></script>
Use that:
var_dump($this->assets->output('header'));
@dreamsxin thx for reply;