Layout Templates

Layout templates are pre-defined arrangements of layouts that may be invoked when creating a new layout or applied to an existing layout.

 

·      To use a template when creating a layout, in the Create Layout dialog check the Template box and choose a template.

 

·      To apply a template after creating a layout, open the layout and use the Edit - Template - Apply command to use a built-in template or a template added to the system through customization, or use the Edit - Template - Apply File command to apply a template from a file.

 

·      To create a new template, create a layout and then use the Edit - Template - Save command to save the layout to a file for use as a template.

 

·      The Edit - Template - Apply command also allows us to use a layout in our project as a template to be applied to the current layout.

 

Standard Templates

 

There are two built-in templates:

 

·      Simple, Entire Component - Shows the entire parent component with the component name as the main title and several information lines.

·      Simple, View + Overview - Similar to the above, but shows a view named Layout in the parent component as the main element with an inset element showing the entire component to give an overview. If there is no view named Layout that has been saved in the Views pane for the parent component, then the main element will be blank.

 

Templates try to provide as much information as possible to duplicate the look and feel of a given layout arrangement. They remember the basic arrangement of elements including their colors and other format options such as borders used in text elements. They save element visibility and preserve Z order, that is, the order in which elements are stacked above each other.

 

Example

 

images\eg_layout_template_01.gif

 

Consider a map of Mexico that's been thematically formatted. To create a print layout, we right click on the drawing in the project pane and choose Create - Layout.

 

images\eg_layout_template_02.gif

 

In the Create Layout dialog we check the Template option and choose Simple, Entire Component as the template we would like to use.

 

images\eg_layout_template_03.gif

 

When we open the resulting layout we see that the result is a neatly-arranged layout that includes a view of the entire component with a North arrow, a main title and a block of additional text information.

 

images\eg_layout_template_04.gif

 

The block of supplementary text information provides the projection in use, the central latitude and longitude and the current date.

 

Templates consist of pre-arranged elements for a layout. We can edit them just like any other element.

 

images\eg_layout_template_04a.gif

 

For example, if we are curious as to how the additional text information is created we can double-click on it to see its properties. As we can see from the above, it is simply a text element that has a variety of escape sequences in it to have text information automatically loaded from the parent component.

 

images\eg_layout_template_05.gif

 

The Simple, View + Overview layout template works with drawings that have a previously-saved view called Layout. To see this template in action we begin by zooming into the Mexico drawing near the province of Durango.

 

images\eg_layout_template_06.gif

 

In the Views pane we create a view called Layout. We right click on the drawing in the project pane and select Create - Layout. In the Create - Layout dialog we check the Template box and choose the Simple, View + Overview layout template.

 

images\eg_layout_template_07.gif

 

In the project pane we right click on the Mexico drawing and select Create - Layout. In the Create - Layout dialog we check the Template box and choose the Simple, View + Overview layout template.

 

images\eg_layout_template_08.gif

 

When we open the resulting layout we see it has a main element that shows the Layout view zoomed in to the province of Durango as the main element as well as an inset smaller element that shows the entire component to provide a contextual overview.

 

Using Edit - Template - Apply

 

The Edit - Template - Apply command allows us to apply either existing templates or existing layouts to a layout. Open the layout to be operated upon, choose the command and then choose either an existing template or an existing layout to apply to the layout.

 

Example

 

Let's create a generic layout and then use it as a template for a different layout.

 

images\eg_layout_template_09.gif

 

We begin with the Mexico drawing illustrated in the examples above. We create a layout called Layout 3 from the Mexico drawing. In the Create Layout dialog we don't use any other templates. It doesn't matter whether we do or do not use a template, but for the sake of this example we will create a very simple layout to show that what we create, even if we don't use another template, can be used in turn with another layout.

 

images\eg_layout_template_10.gif


After some tinkering and editing we create the above layout. It shows the parent component within a box border. Large captions are above and below the main element with a small scale bar to the right.

 

images\eg_layout_template_11.gif

 

So far, so good. We now change gears and import a drawing that shows congressional districts in the US. We create a simple layout for the drawing as seen above.

 

images\eg_layout_template_12.gif

 

To apply an existing template or layout to this layout we choose Edit - Template - Apply. In the Apply Template dialog we check the Apply a template radio button and choose the Simple, Entire Component template. Press OK.

 

images\eg_layout_template_13.gif

 

The result is that the layout showing congressional districts immediately switches to the arrangement specified by the Simple, Entire Component template. Excellent!

 

To change the arrangement again, we once more choose Edit - Template - Apply.

 

images\eg_layout_template_14.gif

 

In the Apply Template dialog we check the Apply a layout radio button and choose the Layout 3 layout we created earlier. Press OK.

 

images\eg_layout_template_15.gif

 

The result now is that the layout arrangement used in the Layout 3 component has now been applied to this layout. It is, of course, somewhat absurd to provide a title of "Mexico" to a layout that shows US congressional districts, but this helps to illustrate the idea of using one layout to specify the arrangement of a different layout. The Edit - Template - Apply command makes it very easy for us to recycle the work done to create clever templates.

 

Obviously, if we wanted to create a series of templates to provide a standardized look and feel for the print layouts we create we would take care to use escape sequences for things like component names, so that the resulting layouts are automatically customized with correct names for the components they show.

 

Note, by the way, that if we are going to use a scale bar in a template to be used with many different components it makes sense to think carefully how we specify the scale bar. In the above illustration a scale bar that was defined for use with Mexico doesn't work very well with the US.

 

Conveniences

 

Manifold will remember the last used layout template and will automatically select it as the default choice in the Create Layout dialog and in the Apply Template dialog. Manifold remembers the last used layout template between Manifold sessions as well.

 

System Customization

 

If we create a custom layout template .xml file and save it in our Manifold System Config folder the layout will become automatically available for use as a built-in template. On startup, Manifold will automatically load any custom layout templates found in .xml files in the Config folder.

 

Programming

 

The Document object includes means to create a new layout using a layout template. The Layout object includes means to apply a layout template to the layout, to generate a layout template from the layout and to save the layout as a layout template.

 

See Also

 

Layouts

Custom Layout Templates

Edit - Template