include if-statement in CMenu

Is it possible to include an "if-statement" in the widget CMenu?

Im creating an admin-interface where you can choose if you want to show a page or not in the main-menu.

so I want to include something like this on each array-item in the CMenu.




if(is_visible) {

		array('label'=>'test', 'url'=>array('/site/test')),

	}



Yes there is a visible property:




array('label'=>'test', 'url'=>array('site/test'), 'visible'=>false)