Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Context Switcher

offtherailz edited this page Apr 30, 2013 · 2 revisions

##General This widged can be used to switch between context (changes the base url and/or one parameter in query sting. Can be used to switch:

  • Language
  • MapId
  • config
  • bbox
  • other custom parameters

##Configuration

exemple:

		var contextSwitcher = new gxp.form.ContextSwitcher({
			data:[["defaultConfiguration","Google/OST","","","public context"],["mycontext","My Context","","mycontext","a private context"] ["id","Custom Viewer", "viewer","config","descript"] ],
			currentContext:customConfigName || "defaultConfiguration",
			paramName:'config'		
		});

this configuration allows to switch beteeen N configurations changing the config parameter. the single entry is ["name","Title","base url(e.g. viewer/composer)","parameter","value","description(optional if you want to use a template"]

so the configuration above allow to switch between

  • Google/OST --> /
  • My Context --> /?config=mycontext
  • Custom Viewer --> /viewer?config=config
Clone this wiki locally