I am developing a website using Yii. I want to change the application name dynamically in program. I know I have to change the Yii::app()->name value. But I know where should I put it to overwrite what is written in config.php file.
Where should I put it?
Change the [font=“Courier New”]‘name’[/font] stanza. Should be pretty close to the top
Oh, well. You are always free to chane [font="Courier New"]Yii::app()->name[/font] by simply assigning it a new value. But I think it were better to alter the name of the app in the [font="Courier New"]protected/views/layouts/main.php[/font] template.
I’d not change the application name, as I see no use for this.
If you want to change the title, just set the title in the layouts/main.
Many features relies on application name, cache id an example. If you change the app name you have to be sure you manually enter a "stable" cache id.
You can put it in every views of your website by putting a value in $this->pageTitle. But I suggest you have to declare the app name and append the other title. Something like this Main Application - Login.
$this->pageTitle = Yii::app()->name."Login"