Yii Framework Forum: Instalación de SMenu - Yii Framework Forum

Jump to content

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

Instalación de SMenu Rate Topic: -----

#1 User is offline   gaby 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 07-November 10

Posted 07 November 2010 - 12:10 PM

Estoy tratando de hacer un menú que contiene submenues y no lo he logrado hacer con CMenu..Me decidi a usar SMenu, lo descargué pero no lo he logrado instalar correctamente. Cuando ejecuto el siguente codigo dentro de main.php:

<div id="mainmenu">
	
		<?php $this->widget('zii.widgets.SMenu',array(
			'items'=>array(
				array('label'=>'Principal', 'url'=>array('/site/index')),				
				array('label'=>'Información', 'url'=>array('info/index'),  
					//'items'=>array(
					//	array('label'=>'Acerca de..', 'url'=>array('/info/acerca_de')),
					//	array('label'=>'Misión', 'url'=>array('info/mision'), 'active'=> false),
					//),
				'items'=>array(
              array('label'=>'New Arrivals', 'url'=>array('info/new', 'tag'=>'new'), 'active'=> false),
              array('label'=>'Most Popular', 'url'=>array('info/index', 'tag'=>'popular')),
         )),
));


Me aparece el siguiente error:

CException
Descripción

Propiedad "SMenu"."items" no se encuentra definida.
Archivo Fuente:

/var/www/yii/framework/web/CWidgetFactory.php(162)

00150: if(isset($this->widgets[$className]))
00151: $properties=$properties===array() ? $this->widgets[$className] : CMap::mergeArray($this->widgets[$className],$properties);
00152: if($this->enableSkin)
00153: {
00154: if($this->skinnableWidgets===null || in_array($className,$this->skinnableWidgets))
00155: {
00156: $skinName=isset($properties['skin']) ? $properties['skin'] : 'default';
00157: if($skinName!==false && ($skin=$this->getSkin($className,$skinName))!==array())
00158: $properties=$properties===array() ? $skin : CMap::mergeArray($skin,$properties);
00159: }
00160: }
00161: foreach($properties as $name=>$value)
00162: $widget->$name=$value;
00163: return $widget;
00164: }
00165:
00166: /**
00167: * Returns the skin for the specified widget class and skin name.
00168: * @param string the widget class name
00169: * @param string the widget skin name
00170: * @return array the skin (name=>value) for the widget
00171: */
00172: protected function getSkin($className,$skinName)
00173: {
00174: if(!isset($this->_skins[$className][$skinName]))

Stack Trace

#0 /var/www/yii/framework/web/CWidgetFactory.php(162): CComponent->__set('items', Array)
#1 /var/www/yii/framework/web/CBaseController.php(139): CWidgetFactory->createWidget(Object(SiteController), 'zii.widgets.SMe...', Array)
#2 /var/www/yii/framework/web/CBaseController.php(165): CBaseController->createWidget('zii.widgets.SMe...', Array)
#3 /var/www/fgpv/protected/views/layouts/main.php(57): CBaseController->widget('zii.widgets.SMe...', Array)
#4 /var/www/yii/framework/web/CBaseController.php(119): require('/var/www/fgpv/p...')
#5 /var/www/yii/framework/web/CBaseController.php(88): CBaseController->renderInternal('/var/www/fgpv/p...', Array, true)
#6 /var/www/yii/framework/web/widgets/CContentDecorator.php(78): CBaseController->renderFile('/var/www/fgpv/p...', Array, true)
#7 /var/www/yii/framework/web/widgets/CContentDecorator.php(56): CContentDecorator->decorate('<div class="con...')
#8 /var/www/yii/framework/web/widgets/COutputProcessor.php(45): CContentDecorator->processOutput('<div class="con...')
#9 /var/www/yii/framework/web/CBaseController.php(199): COutputProcessor->run()
#10 /var/www/yii/framework/web/CBaseController.php(294): CBaseController->endWidget('CContentDecorat...')
#11 /var/www/fgpv/protected/views/layouts/column2.php(24): CBaseController->endContent()
#12 /var/www/yii/framework/web/CBaseController.php(119): require('/var/www/fgpv/p...')
#13 /var/www/yii/framework/web/CBaseController.php(88): CBaseController->renderInternal('/var/www/fgpv/p...', Array, true)
#14 /var/www/yii/framework/web/CController.php(741): CBaseController->renderFile('/var/www/fgpv/p...', Array, true)
#15 /var/www/fgpv/protected/controllers/SiteController.php(32): CController->render('index')
#16 /var/www/yii/framework/web/actions/CInlineAction.php(50): SiteController->actionIndex()
#17 /var/www/yii/framework/web/CController.php(300): CInlineAction->run()
#18 /var/www/yii/framework/web/CController.php(278): CController->runAction(Object(CInlineAction))
#19 /var/www/yii/framework/web/CController.php(257): CController->runActionWithFilters(Object(CInlineAction), Array)
#20 /var/www/yii/framework/web/CWebApplication.php(324): CController->run('')
#21 /var/www/yii/framework/web/CWebApplication.php(121): CWebApplication->runController('')
#22 /var/www/yii/framework/base/CApplication.php(135): CWebApplication->processRequest()
#23 /var/www/fgpv/index.php(13): CApplication->run()
#24 {main}

Alguno de ustedes me puede ayudar?..Gracias de antemano :rolleyes:
0

#2 User is offline   sebas 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 496
  • Joined: 28-October 08
  • Location:Buenos Aires, Argentina

Posted 07 November 2010 - 12:19 PM

Priemro es CMenu y no SMenu.

por otro lado algo raro pasa, podrías indicarnos que plataforma usas (PHP version, web server, php.ini error configuration).

Gracias
0

#3 User is offline   gaby 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 07-November 10

Posted 07 November 2010 - 03:43 PM

Hola sebas, gracias por responder..

Bueno te cuento que el SMenu es una extensión que encontre por aca: http://www.yiiframew...extension/menu/,

Cuando hago la prueba usando CMenu me aparecen los items, pero como hago si tengo una lista de subitems??

Uso SO Ubuntu 9.10
Apache Apache/2.2.12 (Ubuntu)
PHP 5.2.10-2ubuntu6.5 with Suhosin-Patch 0.9.7
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