L
L
Light7772015-12-19 12:03:55
Yii
Light777, 2015-12-19 12:03:55

How to register js files and js blocks in Yii2?

There is a business card site with several pages.
There are scripts that are used throughout the site, I added them to Asset.
There are js files and blocks that are used only on one page (sliders, gallery, etc.).
How can I set the registration order for individual js blocks and files so that nothing conflicts?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
sillusi0nsx, 2015-12-24
@sillusi0nsx

Yii2 how to change js connection order?

A
Alexey Likhachev, 2015-12-24
@Playbot

ideally create another Assets, add the required there and set the dependencies

S
Sergey, 2014-05-06
Protko @Fesor

WAT? why? There are APC / opcache, which store opcodes that are ready for execution.
Or do you need html minification?

B
Boris Shepelev, 2014-05-05
@bshepelev

Before optimizing or compressing a PHP file, ask yourself a question! And in the future, if you need to refine the functionality or make changes to the code, can you figure out what you get as an output!
Service: htmlcompressor.com/compressor

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question