Build a Map Repository in SharePoint – Part 3
After I created my document library to hold my Training Routes… you have created your Map Repository, right? Part 1, Part 2…, I wanted to make the results of each map available to everyone within the site collection.
I did that by creating Content Editor Web Parts that contained the link to the code for each map, exported the CEWPs and then inserted them into the Web Parts gallery under a grouping called “Training Maps”.
Build a Training Route Placeholder Page
For each of the training routes in the Training Routes library, create a Content Editor Web Part that points to a training route link and change the title text of the web part to the training route name. The simplest way to do this without screwing up your site is to create a web part page and insert multiple CEWPs on the page (Site Actions -> Create -> Web Part Page). My naming convention is to call the page DELETEME.aspx, so that I know I can delete the page when I’m done without having to think about it.
Here’s a little trick about adding web parts to a page you might not know about. Insert one CEWP on the page, then hit the “Refresh” button on your browser for the number of web parts you’ll need. Each time you refresh the page, an additional CEWP will be added to the page.
Use the training routes you created in Part 2 and insert them into the CEWPs. When you are finished, you’ll have a page, DELETEME.aspx, full of training route maps.
Export Training Route Web Parts
Each of the Content Editor Web Parts can now be exported and saved to your hard drive.
The dropdown arrow on the right hand side of the web part has an “Export” choice. Choosing export will allow you to save the file. For organizational purposes, I created a folder on my Desktop called “WebParts-Maps”, to hold the exports.
Once all the web parts are exported, you’ll have a folder on your hard drive with all the training routes in it.
Import Training Route Web Parts into Web Part Gallery
In order to do this step, you will need to have Site Collection Admin permissions, since we’ll be accessing the Site Collection Web Part Gallery.
Move to the top of the Site Collection and open the Web Parts Gallery (Site Actions -> Site Settings -> Galleries -> Web Parts). Click the “Down” arrow next to the “Upload” button on the list menu. Choose “Upload Multiple Documents”. Browse to the folder where you stored the web parts and choose all of them.
Click “OK” and “Yes” to confirm the upload.
Sort the web parts by clicking the “Modified” column, choosing “Descending” to show the web parts you just uploaded. Click the “Edit” icon on the first web part. In the “Group” box, select “Specify your own value” and add “Training Routes” as the value. Doing this will create a group that’s easy to find when you go to insert your Training Route Web Parts onto a page.
Edit the properties for each of the other web parts, inserting them into the “Training Routes” group.
Final Thoughts
Now that the web parts are in the Web Part Gallery, any Site Manager within the Site Collection has access to the maps and can insert them on any page where they are needed.
The technique shown in this series of articles can be used for any type of content that needs to be used in multiple places within your Site Collection. Setup a document library to hold the text files to be pointed to as sources, point to the sources using a Content Editor Web Part, export the results and then import the web parts into the Web Part Gallery.
It’s a robust, easy to use solution that will make a huge difference to your Site Managers. I’d appreciate comments on how you might use this type of solution in your environment.
- Build a Map Repository in SharePoint - Part 1
- Build a Map Repository in SharePoint - Part 2
- Build a Map Repository in SharePoint – Part 3
I could see this used by companies that have multiple locations. If a customer was to call and ask the nearest location, having a map web part that every site could easily implement could be a real advantage. The one thing I found in creating the map was that it was a bit tricky to create a map without a directional route included. It required signing in to my Google account and creating a ‘My Map’ to simply plot locations without including directions. The best part is that it has a direct link to the map underneath, so you can click it, add the customer address and confidently give directions – you could even email the map to customers after you’ve plotted the directions to your nearest store location (make your My Map public). Fun stuff!