Select to view content in your preferred language

Possible to hide widget from header controller?

491
1
12-07-2011 06:39 AM
MichaelOberegger
Emerging Contributor
Hi everyone!

Is it possible to configure a widget so that it does not display in the header controller? I would like to have a widget that can only be opened from another widget (instead of clicking the widget's icon on the header controller).

I have tried to configure a widget with the other default ones (like NavigationWidget, OverviewWidget), but doing this will cause the widget to be preloaded automatically (regardless of what value I put in the preload attribute).

I am not 100% sure that I actually need to configure a widget in the config.xml file, but the only way I know how to load one manually is through the widgetManager, which requires a configuration entry. If there is a way to load a widget without configuring it, I will be able to bypass the aforementioned issues. For reference, this is the code I am using to load:

widgetManager.getWidget(widgetManager.getWidgetId("My ID"), true);

So, in summary:
Is there a way to configure a widget without it displaying in the header controller and not having it automatically preload?
Alternatively, is there a way to load a widget without having to configure it?

Thank you for your time. Any help is greatly appreciated.

Thanks!
Mike
Tags (2)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus
Mike,

   The simplest way is to edit the HeaderControllerWidget.mxml

            private function getWidgetItems(widgetList:Array):ArrayCollection
            {
                var menuItems:ArrayCollection = new ArrayCollection;
                var widgetItem:WidgetItem;
                for (var i:int = 0; i < widgetList.length; )
                {
//If widgetList Item label equals the widget you want to eliminate
                    if(widgetList.label == "Your widget Label")
                        continue;
//End of additional code
0 Kudos