thx qiang.
I opened my commandline and typed
www/yii/framework/yiic webapp www/skeleton
Create a Web application under '/var/www/skeleton'? [Yes|No] y
And voila, the whole structure is there… The basic structure.
Now i am gonna make some tweaks.(wish me luck)
Adding the admin section for my back-end.
In dreamweaver I'd setup a site called skeleton.
When adding the I mentioned that i didnt have access to the images folder.
so for now i chmod my skeleton folder to 777 to have access there…
chmod 777 -R www/skeleton
Now in dreamweaver i can access the files.
According to Qiang's tip for a folder structure I added some files and folders.
Which looks like this:
index.php
admin.php
protected/
config/
main.php
admin.php
components/
controllers/
admin/
models/
views/
admin/
I opened the index.php file and saved the file as admin.php, then i did some editing.
$config=dirname(__FILE__).'/protected/config/admin.php';
as you can see I pointed to the proper config file called admin.php and saved the file again.
Then I opened admin.php (which is a copy from main.php) in the protected/config folder.
Here i go…
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'WEBADMIN',
I figured that i must change the basepath to point to my admin view section?
Under 'name' i made it WEBADMIN
But I dont know what to put as a basePath
Here I got stuck.
I moved on to finish the directory structure.
I created a admin folder in the controllers folder and copied the SiteController.php to that folder.
After opening this file I mentioned that this can stay this way for the moment.
All I see here are some basic actions.
Then I moved to the view section.
There i created again a admin folder and copied the folders /layouts and /site with the containing files to the admin folder.
the structure look like this
index.php
admin.php
protected/
config/
main.php
admin.php
components/
controllers/
SiteController.php
admin/
SiteController.php
models/
views/
admin/
layouts/
main.php
site/
contact.php
index.php
login.php
layouts/
main.php
site/
contact.php
index.php
login.php
system/
Question 1. The basePath in admin.php in the config folder needs to be admin.
What is the proper code to puth there?
Question 2. Does the view/admin folder need his own folder structure?
site/ and layout/ i think so because we want to create a totally diffrent layout here