[mapguide-users] Add new template layout to Mapguide Studio
Chris Claydon
chris.claydon at autodesk.com
Mon Feb 2 10:10:13 EST 2009
Indeed there is! Studio obtains the list of available templates by calling the ENUMERATEAPPLICATIONTEMPLATES HTTP operation. If you're curious to see the response, you can submit the request from the "Web Applications" section of the web tier test pages.
The information returned comes from the template info files stored in the www/fusion/templates/mapguide folder in the web tier installation. In this folder you'll see XML files called slate.xml, aqua.xml, maroon.xml, limegold.xml and turquoiseyellow.xml. These correspond to the 5 standard templates you can see in Studio.
To get another template to show up in Studio, all you need to do is drop your own XML template info file into this folder.
The content of the Slate template info file is shown below. For your own template, you should:
1) Pick a unique <Name> value
2) Set the LocationUrl to point to the main HTML page in your template
3) Set the <Description> - This shows up in a tooltip when you hover over the template in Studio
4) Create a 126x96 preview image for your template, and set its URL in the PreviewImageUrl field.
5) Define <Panel> entries for each of the IDs that you want to be able to assign components to in Studio - if you've based your custom template on one of the existing MG templates, you may not need to change the existing entries.
You shouldn't need to re-start anything to get the template to show up in Studio, just right-click in the list of existing templates and choose "Refresh". If you've got everything set up correctly, your new template should show up in the list. Let me know if you run into any problems.
Chris.
<TemplateInfo>
<Name>Slate</Name>
<LocationUrl>fusion/templates/mapguide/slate/index.html</LocationUrl>
<Description>Slate template</Description>
<PreviewImageUrl>fusion/templates/mapguide/slate/preview.png</PreviewImageUrl>
<Panel>
<Name>FileMenu</Name>
<Label>Toolbar (Main Menu)</Label>
<Description>The horizontal menu bar displayed at the top of the screen</Description>
</Panel>
<Panel>
<Name>Toolbar</Name>
<Label>Toolbar (Primary)</Label>
<Description>The main toolbar, displayed across the top of the map</Description>
</Panel>
<Panel>
<Name>ToolbarSecondary</Name>
<Label>Toolbar (Secondary)</Label>
<Description>The secondary toolbar, displayed beneath the main toolbar</Description>
</Panel>
<Panel>
<Name>Statusbar</Name>
<Label>Status Bar</Label>
<Description>The status bar, displayed below the map</Description>
</Panel>
<Panel>
<Name>Map</Name>
<Label>Map</Label>
<Description>The main map display</Description>
</Panel>
<Panel>
<Name>OverviewMap</Name>
<Label>Map (Overview)</Label>
<Description>The dialog containing the overview map</Description>
</Panel>
<Panel>
<Name>TaskPane</Name>
<Label>Task Pane</Label>
<Description>The panel displaying the task pane</Description>
</Panel>
<Panel>
<Name>Legend</Name>
<Label>Legend</Label>
<Description>The panel displaying the legend</Description>
</Panel>
<Panel>
<Name>SelectionPanel</Name>
<Label>Selection Panel</Label>
<Description>The panel displaying current selection</Description>
</Panel>
<Panel>
<Name>Navigator</Name>
<Label>Navigator (Zoom Slider)</Label>
<Description>The navigator and zoom slider</Description>
</Panel>
</TemplateInfo>
-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Rui Daniro
Sent: Monday, February 02, 2009 5:18 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Add new template layout to Mapguide Studio
I would like to know if there is a way to add a new template layout to the
existent list on Mapguide Studio?
--
View this message in context: http://n2.nabble.com/Add-new-template-layout-to-Mapguide-Studio-tp2257619p2257619.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list