mocapapa
(Mocapapa)
1
When I make ‘<a name=“test”></a>’ tag in the page xxx, and try to jump to this tag using ‘http://hostname/xxx#test’, but as I used urlsuffix configuration thus the url is changed to ‘http://hostname/xxx#test.html’ instead of ‘http://hostname/xxx.html#test’. Does anybody out there can solve this issue?
Keith
(Kburton)
2
How are you generating the URL?
mocapapa
(Mocapapa)
3
Following is a part of my main/config.php
// application components
'components'=>array(
:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'urlSuffix'=>'.html',
'rules'=>array(
'rss'=>'feed',
'/'=>'site/index',
),
),
:
mocapapa
(Mocapapa)
4
Does anyone have an idea for solving this issue?
softark
(Softark)
5
Hi mocapapa,
Yii treats the anchor as a $param parameter when it creates an url.
Try this:
echo CHtml::link("Go to Test", array("controller/action", "#"=>"test"));
http://www.yiiframework.com/doc/api/1.1/CUrlManager#createUrl-detail
http://www.yiiframework.com/doc/api/1.1/CHtml#normalizeUrl-detail
mocapapa
(Mocapapa)
6
Hi Softark,
Itsumo Osewani Nattemasu! (‘I am always taken care of.’ by yahoo translation 
This works fine! Thank you.