Open raxan opened 9 years ago
I'm not sure I understand.
The child view is the first to set the value of the javascript
block which means, (unless you set the $append
flag to true) the parent values will be overwritten. Change it to this:
<?php $this->end('javascript', true) ?>
Hi
I hope you can give me some tips to solve this issue.
Currently I have the main layout something like this:
And an example of a view which extend that layout is:
Note $this->styles() and $this->javascripts() are custom method added to Template class, which receive an array of css or javascript filename without extension, and return a string of html tag link for css or script for js.
Everything is ok and work fine.
I have create this method, because I think to easy create 1 minified css / js file using 1 method to add css/js, because I can add an option on that methods and check if enabled compress css/js then don't return html tag for each file, but only 1 file and cache this on file system.
But since the nature of theme, what happen?
Firstly the template seem render header of layout, and then main content where there is more css/js file which require to be load, but I can't add anymore to 1 file because is already rendered.
Please let me know if maybe is not clear my explaination.
Thanks!!