Then someone asked us 'can I pass configuration parameters with the url querystring?'
What a simple and powerful idea! Last Wednesday we said 'no', but today we can say YES!
We have created a table of all the parameters IntelliGantt recognizes. You can use these parameters via the initParams property if you've configured a 'Site Only' instance of the IntelliGantt Web Part, or you can pass these parameters to the SharePoint page housing the IntelliGantt Web Part via the url querystring and make things really dynamic.
The best example of this new capability is how you can now select a task list and view by placing information in the url querystring. Let's say I have a SharePoint site with two task lists: Tasks and Big Project. By default, the IntelliGantt Web Part finds all the task lists in your site and displays them:
Yes, we can either use the 'Exporer' to select just one project, or we can use the web part editor page to select a single project. But what if we could determine the list to show before-hand and construct a url with selected project and view information? Then we can actually plug the web part into a multi-step workflow process.
First, let's add a SelectListIDs value to the url so that just one project is selected. You can find a task list id value by first navigating to the task list:
and then going to the List Settings:
Once in the List Settings, notice that the url string in your web browser contains a querystring parameter of List=
We can use this exact same list idea value in the querystring of the url of the IntelliGantt Web Part page. Rather than just 'List', we use 'SelectedListIDs' because we think it's clearer and we support multiple lists in the view. There, we create an url like so:
Finally, you can add multiple paramteters to the querystring just as you'd expect-- by concatenating them with the '&'. So, now that we've selected the right list, we can also select the view to use via the query string by appending the view name:
And voila, the task list and view for the IntelliGantt Web Part have been determined by the values in the querystring. What if the same parameter is defined in the web part editor? Then the web part editor value will take precedence. In order use the querystring parameter, make sure the corresponding field in the web part editor is blank.
As we add more configuration options to the IntelliGantt Web Part, we will make sure they can be set via the web part editor, the initParams or the querystring. This will ensure our design goal of making our web part as flexible for system integrators as possible.