Hi dears,
I want to display the menu item with a space. I am using
for this in the label but there is no success.
Any help?
Hi dears,
I want to display the menu item with a space. I am using
for this in the label but there is no success.
Any help?
Set its encodeLabel property to false
$this->widget('zii.widgets.CMenu',array(
'encodeLabel'=>false,
...
Why don’t you simply use a space? :] Just like that:
array('label'=>'Go to a Start Page', 'url'=>array('/main/index')),
What seems to be the problem?
Menu items are not HTML-decoded before display, so &nsbp; or any other HTML entity will remain as you write it.
Thanks dears,
but what about the code?
Could we encode selected items of menus?
Yes? :] If you turn off default encoding of each label as Antonio showed you (thanks, man I missed that one! :]) you can then simply encode any label you want using standard HTML-encoding functions of PHP. If you want to encode all labels, you don’t turn off default encoding. That is all.
Thanks Trejder for you help.
Hello,
I have a similar problem. Have a textArea created with CActiveForm widget:
$oContentForm = $this->beginWidget('CActiveForm');
echo $oContentForm ->textArea($oModel, 'attributeName', array('rows'=>20,'cols'=>125,'id'=>'ContentID'));
$this->endWidget();
If in this textArea write HTML tags (<b>Bold Text</b>) and press Submit button, this tags HTML is not sending by post method.
Any idea friends?
Regards,
Thanks.