Inserting Snippets
Snippets can be inserted into your map file using the Map Editor. The snippets are stored in individual files in the location defined by the SnippetDefinitionPath under the MapEditor section of the iShare Studio General Settings, and are loaded at run-time thus allowing users to create new or change existing snippets.
Before adding a snippet position your cursor in the Map Editor at the point where you want to add your snippet. Snippets can be added either from the Toolbar or by using a Shortcut.
From the Toolbar
Insert a snippet in the map file. The options displayed will depend upon the snippets that have been stored in the specified SnippetDefinitionPath e.g.
Via a Shortcut
Each snippet also has a shortcut, type the specified shortcut then press tab once.
Once a snippet is inserted it may highlight a piece of the snippet by surrounding it with a green box; these are areas which need changing. To change the content simply type over it and then press tab to move on to the next item. Once you are done press Return to finish. In the case of the Layer snippet below the required entries are the "NAME" and "SQL_STATEMENT".