This is the storage of all your data related only to the frontend side of the website.
Frontend is meant to be the public side of your application, open to the visitors. It is here you provide the value for your customers.
Structure of this folder is the same as of backend
one, and is based on the traditional protected/
folder
from the project skeleton generated by Yii console tools.
frontend/www
is the web root of the frontend, which should be published by your web server.
-
components
All of the
CApplicationComponent
descendants registered undercomponents
section of config. Usually descendants ofCWebApplication
,CWebUser
,CUserIdentity
end up here, too. -
config
Pieces of configuration overrides relevant only to frontend are there.
-
controllers
All of the
CController
descendants are intended to be placed here. Note that usually baseController
class ends up incomponents
directory. -
extensions
All of Yii extensions you want to be explicitly associated with website frontend. No restriction of usage is enforced, you still can import classes from here to any other entry point like backend.
-
models
All of
CModel
descendants which should be visible in frontend entry point only. Usually all of helper classes and business domain objects end up here, too. -
modules
This is the directory for modules inside the frontend.
-
packages
Packages of CSS&JS assets to easily include them into frontend layout using
CClientScript.register*
methods. Initially in YiiBooster inside this folder lies the package for the frontend-specific styles describing its design. -
runtime
Yii requires this folder to hold some temporary files used while running.
frontend/runtime
is used only by the frontend entry point. -
views
View files for controllers. Structure is the same as in traditional
protected
folder: for each controller ID there should be a subfolder with all view files for this controller. -
widgets
All
CWidget
descendants intended to be associated with frontend. As withextensions
folder, no real usage restriction is enforced, you are free to reference this widgets from backend, too. -
www
Web root of the frontend entry point. You publish this folder using your web server to make the frontend accessible from Web. Anything inside
www
is intended to be directly publicly visible by visitors.