D
D
dkrylov2017-07-11 15:50:00
Yii
dkrylov, 2017-07-11 15:50:00

General styles for the project. How to distribute them in yii2 advanced?

Hello!
There are a couple of files that are the same in /backend/web/css/ and /frontend/web/css/. Is it possible to somehow organize their storage in one place, so that they can be connected to the backend and front from one place?
Subdomain? Or perhaps a simpler solution?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Abdula Magomedov, 2017-07-11
@dkrylov

Create an AssetBundle, you can store it in the common folder or in any other place where you store common files (components, etc.), and just include it here and there.
details: https://github.com/yiisoft/yii2/blob/master/docs/g...
item: #Resource-Location

M
Maxim Timofeev, 2017-07-11
@webinar

if this is a couple of files, then you can redirect the request in htaccess.
You can make symlinks
You can set up assets, as Abdula Magomedov wrote , but it will still create 2 duplicates in the assets folder on the front

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question