i think this is a bug !! so i report it.
(just like what i wrote in the issue at google codes)
the problem appear when overriding CClientScript::renderHead()
What steps will reproduce the problem?
1.make new project (yiic webapp myapp)
2.create new component inside:
protected/coomponents/MyClientScript.php
with the code:
<?php
class MyClientScript extends CClientScript {
public function renderHead(&$output)
{
$output="Hello world";
}
}
- add new component into components array inside
protected/config/main.php
// application components
'components'=>array(
'clientScript'=>array(
'class'=>'MyClientScript',
),
),
- navigate into:
http://localhost/mya...hp?r=site/index then into http://localhost/mya…?r=site/contact
What is the expected output? What do you see instead?
"Hello world" in entire site.
in index and about (static pages) the MyClientScript component doesn’t execute at all…it should render the header for entire website from ‘class’=>‘MyClientScript’
What version of the product are you using? On what operating system?
-
Yii 1.1.7
-
ubuntu natty
-
firefox 4 and chrome.
Note: i attached my project for testing.