Yii Framework Forum: CMenu question - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CMenu question Rate Topic: -----

#1 User is offline   Minase Taki 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 19-January 10

Posted 19 January 2010 - 02:59 PM

i was wondering how can i print html tags in cmenu
what i want to achieve is space betwen menus
thank you
$this->widget('zii.widgets.CMenu',array(
'items'=>array(
array('label'=>'Menu1', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest),
//here i want a <br> to be displayed without closing the items array and echo it manually
array('label'=>'Menu2', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
		),)); 


0

#2 User is offline   Daniel M 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 27
  • Joined: 19-January 10
  • Location:Germany, Saarland

Posted 19 January 2010 - 06:23 PM

This is neither possible nor XHTML valid.

Between </li> and <li> is no <br /> tag allowed in the XHTML standard.

To solve your problem, you can add a margin-bottom to your style sheet definitions of your list entry's class.
Utinam ea res tibi usui fuerit!
0

#3 User is offline   Minase Taki 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 19-January 10

Posted 19 January 2010 - 06:46 PM

dont worry i already removed the ul and li tags because my application doesnt need them :)
still i need to make something like this

Menu 1
SPACE
Menu 2

Ty
0

#4 User is offline   bettor 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 751
  • Joined: 02-February 09

Posted 20 January 2010 - 01:08 PM

View PostMinase Taki, on 19 January 2010 - 06:46 PM, said:

dont worry i already removed the ul and li tags because my application doesnt need them :)
still i need to make something like this

Menu 1
SPACE
Menu 2

Ty


As Daniel M has pointed out the best solution would be to apply some css margin-bottom: 20px; for example to all your Menu options.
0

#5 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 20 January 2010 - 05:00 PM

Another option would be to extend CMenu::renderMenu() to render it to your likings.
http://php-thoughts.cubedwater.com - my bloggings about Yii
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users