Is it possible to have multiple
<?php echo $this->headScript(); ?> in one view?
Like
<?php $this->headScript()->appendFile('foo.js'); ?> <?php echo $this->headScript(); ?> some other html here <?php $this->headScript()->appendFile('bar.js'); ?> <?php echo $this->headScript(); ?> Currently it duplicates foo.js, so is there a way to clean the headScript container?
UPD:
The exact problem is that I'm not satisfied with how <?php $this->headScript()->captureStart(); ?> works. Because I cannot specify <script type="..."> there thus my IDE doesn't treat the code between captureStart and captureEnd as a javascript.
So I want to split output into 2 parts, with <script type="text/javascript"> between them
PS: I know that it is better to move js to a separate file, but in this particular place I need it to be specified inline