IDML Reference / Layers
The layer model
The IDML Layer element, the bottom-to-top order of layers in the design map, and the ItemLayer reference that puts a page item, or a whole group, on a layer.
Reviewed against engine v0.71.6
A layer is defined once in the design map; a page item joins it by naming its id in ItemLayer, and the design map's order is the layers' stacking order, bottom first.
In short Layers are <Layer> children of the Document element in designmap.xml. Each
has a Self id, a Name and switches: Visible, Printable, Locked, and a few for guides
and the panel. They are listed from bottom to top: items on the first layer paint first,
under everything on later layers. A page item names its layer in ItemLayer. Group members
are on the group's layer, and a group without ItemLayer lands on the first layer.
The <Layer> element
| Attribute · Layer | Values | Seen in |
|---|---|---|
| Locked | false | true | 100% |
| Name | text | 100% |
| Self | id | 100% |
| Visible | true | 100% |
| Expendable | true | 100% |
| IgnoreWrap | false | 100% |
| LayerColor in Properties | — | 100% |
| LockGuides | false | 100% |
| Printable | true | 100% |
| ShowGuides | true | 100% |
Selfis whatItemLayerrefers to.Nameis the label in InDesign's Layers panel.Visible,PrintableandLockedare covered on visibility and printing.ShowGuides,LockGuides,IgnoreWrap(items on the layer cause no text wrap),ExpendableandUI, and the panel colourLayerColor, do not change what a page looks like apart fromIgnoreWrap.
The order of the list is the stacking order
The design map lists layers from the bottom of the Layers panel to the top. Everything on the
first-listed layer paints before everything on the second, and so on; within one layer, the
order of the items in the spread decides. So a background layer comes first in the design map
and a text layer last. Real documents read that way: one lists Background, Placeholders,
Design Elements, Text.
The red rectangle is written first in the spread, but its layer is listed second in the design map, so it paints above the blue rectangle.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?aid style="50" type="document" readerVersion="6.0" featureSet="257" product="20.0(32)"?>
<Document xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0" Self="d" StoryList="ustory" Name="layer-order.indd" CMYKProfile="Coated FOGRA39 (ISO 12647-2:2004)" RGBProfile="sRGB IEC61966-2.1" SolidColorIntent="UseColorSettings" AfterBlendingIntent="UseColorSettings" DefaultImageIntent="UseColorSettings">
<Layer Self="ulayer-bottom" Name="Bottom" Visible="true" Locked="false" Printable="true"/>
<Layer Self="ulayer-top" Name="Top" Visible="true" Locked="false" Printable="true"/>
<idPkg:Graphic src="Resources/Graphic.xml"/>
<idPkg:Fonts src="Resources/Fonts.xml"/>
<idPkg:Styles src="Resources/Styles.xml"/>
<idPkg:Preferences src="Resources/Preferences.xml"/>
<idPkg:Tags src="XML/Tags.xml"/>
<idPkg:MasterSpread src="MasterSpreads/MasterSpread_umaster.xml"/>
<idPkg:Spread src="Spreads/Spread_uspread.xml"/>
<idPkg:Story src="Stories/Story_ustory.xml"/>
<idPkg:BackingStory src="XML/BackingStory.xml"/>
</Document>
ItemLayer
A layer holds no list of members. Each page item names its layer:
| Attribute · Rectangle | Values | Seen in |
|---|---|---|
| ItemLayer | ref | 35% |
ItemLayer appears on TextFrame, Rectangle, Oval, GraphicLine, Polygon and
Group, and on ruler guides.
Groups put their members on their own layer
A group and its members are on one layer, the group's. A member's own ItemLayer does not
take it out of the group's layer. A <Group> written without ItemLayer lands on the
document's first layer, the bottom one, and takes its members with it, whatever layers the
members name. Write ItemLayer on every group.
A missing or unknown layer
InDesign writes ItemLayer on page items in documents with layers. For a group, leaving it
out means the first layer (above). A reader should treat any other item without a resolvable
ItemLayer as visible: dropping content because a reference is missing is worse than drawing
it.
Nested layers
A <Layer> element written inside another <Layer> is a child layer: hiding or locking the
parent hides or locks the children. None of the documents surveyed for this reference nests
layers; InDesign's own files list them flat.
In Paged: layers are read in design-map order and sort items bottom to top; nested
Supported · verified Supported · verified<Layer>elements are read as a hierarchy, a child inheriting a hidden or locked parent. An item whoseItemLayeris missing or unknown is drawn.
Frequently asked questions
How does a page item get onto a layer?
Its ItemLayer attribute names the layer's Self id. The reference runs from item to layer;
the layer lists no members.
Which layer is on top?
The last one listed in designmap.xml. The list runs from the bottom layer to the top layer,
so the first <Layer> paints first.
Which layer are group members on?
The group's. A group without ItemLayer goes to the first, bottom layer, members included.
What happens if ItemLayer names a layer that does not exist? Nothing defines what that layer would hide, so a reader should draw the item as if it were on a visible layer.
Layers
An IDML layer is a named, document-wide plane that page items join; it sets paint order between layers and can hide, lock or stop printing its items.
Visibility and printing
When an IDML page item is drawn and printed — the layer's Visible and Printable, the item's own Visible and Nonprinting, and why Locked changes nothing.