Hi!
I am new to Yii and I want to create the correspondint file structure.
I need frontent to be accessable via www.mysite.com
and backand to be accessable via www.mysite.com/admin
I will use simple hardcoded admin username/password for administation for now.
What would be the best folder structure?
I have found the following http://www.yiiframew...i-project-site/
but I do not understand if it fits my needs.
As I have read in some forum topics this makes two different vhost links (for backend and frontend).
I actually do not need it. I need to have only one virtual host link that points to www.myside.com.
Page 1 of 1
folder structure
#2
Posted 21 May 2012 - 05:17 AM
I suggest you to create admin module. So you link will be index.php?r=admin/controller/action instead of index.php?r=controller/action.
#3
Posted 21 May 2012 - 05:43 AM
Admin module
or
add sub-folder "admin" in /controllers and /views and put you controllers and view files into them.
If you need something simple I'd go with the second approach. For a more advanced usage I'd go with an admin module.
I'd use the approach from the link you provided for a large/huge project only.
or
add sub-folder "admin" in /controllers and /views and put you controllers and view files into them.
If you need something simple I'd go with the second approach. For a more advanced usage I'd go with an admin module.
I'd use the approach from the link you provided for a large/huge project only.
#4
Posted 21 May 2012 - 06:12 AM
Thank you.
I have quite simple project, so I like an approach with admin subfolders.
However, I have a question:
when do you choose to have admin subfolder and when do you use admin module?
I have quite simple project, so I like an approach with admin subfolders.
However, I have a question:
when do you choose to have admin subfolder and when do you use admin module?
#5
Posted 21 May 2012 - 08:55 AM
Module usage description - I couldn't describe better 
In other words: if you need not only back-end CRUDs with views, but used in back-end only models and/or components and/or external libraries, then, of course, you'd better to use a separate admin module.
IMO, there's not that big difference for a simple back-end between these approaches, and the choice often depends on whole application design and architect developer taste.
In other words: if you need not only back-end CRUDs with views, but used in back-end only models and/or components and/or external libraries, then, of course, you'd better to use a separate admin module.
IMO, there's not that big difference for a simple back-end between these approaches, and the choice often depends on whole application design and architect developer taste.
#6
Posted 17 July 2012 - 10:45 PM
If you want to go for advance you should go with module or add sub-folder "admin" in /controllers and /views and put you controllers and view files into them..
Share this topic:
Page 1 of 1

Help













