[font="Arial,"][size="4"]Ok I have a controller class in Yii that I want to use a different view folder aside from using its default view folder.[/size][/font]
[font="Arial,"][size="4"]The natural behavior is when a $this->render("<view file>"); you would use the following to navigate your view file in the project…[/size][/font]
[indent]"//" navigates project default view folder
"/" navigates current theme view folder
or do not use anything to select a view automatically in the controller’s default view folder
[/indent][font=“Arial,”][size=“4”]but my problem is i’m not rendering a view file but a STATIC PAGE that resides in /pages folder of a certain view folder. The static page I want to navigate is a static page the resides in my current theme folder views but the default is the controller navigates the static page inside the /protected/viewfolder[/size][/font]
[font=“Arial,”][size=“4”]I tried also this override to modify the controller’s view folder. I put this code in my controller that I want to render static pages in a theme folder[/size][/font]
[color="#00008B"]public[/color] [color="#00008B"]function[/color] init(){
$this->layout = [color="#800000"]"//layouts/script"[/color];
$this->viewPath = [color="#800000"]"/js"[/color];
}
[font="Arial,"][size="4"]but the problem is the viewPath is readOnly variable.[/size][/font]
[indent][size=“5”]Now my question is how I can render static pages that resides in my current theme’s view folders?[/size]
[/indent]