0
在我的項目中,我需要組織multitems。 但它不適合不同的CSS文件,我的主題應該是完全獨立的。如何在yii2中創建多主題的最佳方法?
所有這一切在我腦海中是
我的分貝:
用戶
-id
-other_colums*
主題:
-id
-other_colums
current_theme:
-id
-user_id
-theme_id
查看代碼:
$param = get value from current_theme;
return $ this-> render ("{$param}-viewname");
所以我有不好的多主題系統。 在Yii2中更好嗎?
每個用戶需要不同的主題嗎? – gSorry
管理css文件的最佳方法是使用資產和資產包 http://www.yiiframework.com/doc-2.0/guide-structure-assets.html – gSorry
如果您需要每個網站有不同的主題,那麼最好的方法是使用高級項目模板。 https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/README.md – gSorry