Yii Framework Forum: Problems with themes in a multisite project yii2 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problems with themes in a multisite project yii2

#1 User is offline   Vali Sum 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 13-February 18

Posted 13 February 2018 - 09:41 AM

Hi guys,
I have a problem with one thing that I am trying to do.
I have a multi-site project in yii2. Depending on the domain that is accessed, one theme or another is loaded within the views. The problem is that there are files in both themes that are identical and I do not want to modify the same file many times. My solution would be to delete the files of all the subjects less than one and from the base controller, make a method that is responsible for seeing if that file that is going to render exists and if it does not exist then go to the path where the main theme is and I loaded it from there. The big problem is that I do not know how to do it. Let's see if someone can help me.
A greeting.
0

#2 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 3,646
  • Joined: 16-February 11
  • Location:Japan

Posted 13 February 2018 - 05:52 PM

http://www.yiiframew...eme-inheritance
0

#3 User is offline   Vali Sum 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 13-February 18

Posted 14 February 2018 - 01:54 AM

View Postsoftark, on 13 February 2018 - 05:52 PM, said:




Thank you very much, my friend! You just saved my life! :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users