Answer the question
In order to leave comments, you need to log in
How to solve problem between yii2 js files and template?
Hello! In order to study yii2, I created a project on yii2 basic and ran into a conflict between the files of the framework itself and the template files, in my opinion the problem is in the js files. I want to keep the menu from yii2 which is given by default and combine it with the template itself, because the template does not have its own menu. If you connect all template js files through AssetBundle, then the menu works, but some template sliders stop working, but if you remove AssetBundle and write js files directly into the template, then the template works, but the menu stops working.
I managed to partially solve the problem by combining conflicting files and direct links to them in the template when AssetBundle is disabled, but I would like to do it correctly with AssetBundle enabled. I read the yii api manual about connections, but did not achieve enlightenment. I would like to get comments from more experienced developers, how do you solve such problems?
Answer the question
In order to leave comments, you need to log in
1. yii2 basic - slag, if you want consistency and convenience, use advanced it is no more difficult.
2. It is not yet clear what you are connecting and how. Throw an example with the code.
3. Conflicts are clearly due to the fact that you are doing something wrong, the only question is: "what are you doing?"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question