07-03-2017 06:50 AM
Is there a way to remove the language selector from the toolbar in gwmpub.aspx interface. I seen in web.config there is the list of languages for the pulldown menu. Thanks!
Solved! Go to Solution.
07-03-2017 04:29 PM
If you have the SDK you could do it via code behind file and update the SetupToolbar function in the *.cs file. Not sure you might have already tried this, but on the COTS product you should be able to do via AdminConsole right? Select the gwmpub.aspx layout in the Layouts tab and uncheck the Language selector under Tools Map Toolbar?
Vishnu
07-03-2017 04:41 PM
i have the geospatial portal sdk and i am using visual studio 2013 community edition.
Which file the code that needs modification?
thanks!
07-03-2017 05:26 PM
OK in portal SDK, you'll have a code behind file call GWMPubPro.aspx.cs file. In that file search for the SetUpMapToolbar() method implementation. There should be a line whcih says t.Add(MapToolbarCategory.Tools, new LanguageSelector()); comment out this line. Should be on all code behind files of the different layouts. Its towards the end in the method.
Once you comment, build and run and the language toolbar would magically disapper.
Vsihnu
07-03-2017 07:21 PM
Neither gwmpub or gwmpubpro.aspx.cs have a line with the word languageselector in them - i had searched the entire solution for that and that was how i found web.config which has the list of languages (and was the only occurance i found)
07-03-2017 08:33 PM
i found the line to remove - it is
AddWorkflowManagerToMapToolbar(this.MapToolbar, this.MainMapStateId);
I am working with gwmpub.aspx so the file i editted was gwmpub.aspx.cs
07-03-2017 08:56 PM
Hey, the line to comment to not to get the language option in GWMPub.aspx.cs would be
t.Add(categoryId, new LanguageSelector());
the one you mention(AddWorkflowManagerToMapToolbar(this.MapToolbar, this.MainMapStateId) is to disable the Workflow Manager.
07-03-2017 09:39 PM - edited 07-03-2017 09:44 PM
I see the problem - the line you mention was on the same line as the line i commented out (separated with a semi colon)
Search was not finding it
So when i commented out my line it commented out the other line as well.
Thanks for the info!
07-03-2017 09:43 PM
Hmm interesting, i have portal SDK EP02 and i sure can see it (see screenshot). Not sure if they changed it on EP03? unlikely, would you want to check the implementaiton of the AddWokflowManagementToMapToolbar method? It should be in the MapBasePage.cs.
07-03-2017 09:46 PM
awesome !