When I create a new Yii application using the yii webapp [my_application]
command, it creates a folder with a bunch of files and folders in it. One of those files is the Controller component which extends the CController. Inside the Controller class, the layout
property is declared as such:
public $layout='//layouts/column1';
My question is: Why is there two slashes in front of the layout string?
Two slashes refer to the views root folder.
Probably it uses XML/XPath internally and an xpath starting with //
is simply an absolute path.
The $layout
XPath in your code would select the <column1>
descendants of the top-level <layouts>
elements.