Is there a way to have Cmenu return a regular URL or am i just making things more complicated than they need to be?
Here it is straight from the docs I wanna put an external pointing url in to the url array but it keeps generating a self referencing url to the current domain. Is there a way to work around that?
$this->widget('zii.widgets.CMenu', array(
'items'=>array(
// Important: you need to specify url as 'controller/action',
// not just as 'controller' even if default acion is used.
array('label'=>'Home', 'url'=>array('site/index')),
array('label'=>'Products', 'url'=>array('product/index'), 'items'=>array(
array('label'=>'New Arrivals', 'url'=>array('product/new', 'tag'=>'new')),
array('label'=>'Most Popular', 'url'=>array('product/index', 'tag'=>'popular')),
)),
array('label'=>'Login', 'url'=>array('site/login'), 'visible'=>Yii::app()->user->isGuest),
),
));
Christ!!! I am having an issue with this but I cannot include the code because I cannot include links in my first post.
let me describe my problem. I use the code as specified in the solution in this post, but instead of getting the URL I specify I get my sites URL with an ?r= and then the URL specified. I would love to include examples but the system won’t let me post them. I hope this makes sense.
Thanks for the reply. So just to be clear, if you are not using friendly URLs you cannot link to an external site using CMenu, but if you use nice URLs then specifying an external URL will properly link off site?