Answer the question
In order to leave comments, you need to log in
How to get direct link to javascript/css files inside yii module?
There is a project in yii, it has a module that performs certain functionality. The goal is to access css or js files in a module without using assetmanager directly. For example, on an external page, set
<script src="http://test.ru/module/js/content.js"></script>
Answer the question
In order to leave comments, you need to log in
Are you sure you want to do this? Perhaps if you describe why you need it, it will be easier to describe to you why it is better not to do it at all and how it is better to do it.
If you want to receive links to assets outside the presentation layer, something obviously went wrong. And yes, only through AssetManager or some of your own, if you really want to make a bike.
If you don't care and you just need to do it, just because you want to, then: the
absolute path to the file is the path to the webroot. If the file is not in the webroot, one way or another, you will have to copy it there. And this is the work of AssetManager.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question