content

<content> defines a placeholder within a template where customized content can be inserted into.

Consider the example below, which are 16 cubes in a 4 by 4 grid layout:

By replacing <cube> with <content> , we turn this layout into a reusable template where we can create grid of our own customized object instead of the cube.

Here, we modify the previous example to produce a grid of pins with a rounded head, each is modeled as a dome above a cylinder.

Named content tags

Content tags can be individually named to take on distinct roles.

<content name="top"/>

Let's look at the example below, which is a sandwich model consisting of a top, a middle, and a bottom layer. In between layers are flat cylinders colored in yellow. Each layer is defined as a content holder. Then, when <sandwidth> is used, we can individually model what goes into each layer, which is represented by the children tags <top>, <middle>, and <bottom> respectively. Inside each child tag, we add a dome, a cube, and a sphere respectively, and color them in brown.