Templater handles unpredictable text with five layout tools that work together: Scale Factor, Align, Attach, Chain and Group. The skill is picking the right one for each layer, and the way to pick is to ask what that layer has to stay true to when the words change.
This page is a decision guide for Templater, which is the layout system we make and the only one we can describe with any authority. We do not compare it against other tools here, because we would be guessing about their rules. What we can do is lay out exactly what each of our five tools does, what it assumes about your layers, and where each one stops working. If you already know the basics, our short overview of layout rules covers the general idea. This guide goes one level deeper and tells you which tool to reach for.
Why text length breaks a template in the first place
Imagine a designer building a template around one sample. The title says “Spring Sale” and it sits in a neat box with a logo to its right. Everything looks balanced because every element was placed by eye against that one string of words. Then the data source delivers a row where the title is “Annual Midwest Regional Dealer Appreciation Weekend.” The text is now several times wider. It runs through the logo, past the edge of the frame, or both.
Nothing is wrong with the data, and nothing is wrong with the design. The design simply encoded one answer to a question that has more than one answer. Layout rules exist to let the design state its intent instead of its coordinates. Instead of “the logo is 40 pixels from the right end of this particular title,” you say “the logo sits against the right edge of whatever the title turns out to be.” The first sentence only works once. The second works for every row.
Our documentation describes the reason plainly. When layers in an After Effects project receive data, new data can alter a layer’s size, alignment, color or position in a way you did not want. Layout rules are how you define what a layer should do when that happens. You set them per layer, in the Templater Settings effect, and each layer can have its own rules. One text layer can be forced to scale to a share of its composition and align to the bottom left corner. Another layer in the same composition, with different rules, can align to the bottom right.
Two ideas sit under everything else, and it is worth holding them in mind before you touch a setting. First, every value is measured relative to the parent composition and to sibling layers. A layer never knows about the full video frame unless its parent composition is the full frame. If your text sits inside a nested composition, the rules apply inside that composition. Second, attached layers follow the layer they are attached to. When Templater updates a dynamic layer’s position and scale, it adjusts the position of any attached sibling layers accordingly. That is why attachment works: the master layer changes first, and the followers move to match.
Three limits apply before any of the tools. Layout rules will not function correctly for layer properties that have Separate Dimensions enabled, so if you split a position property into X and Y, expect trouble. The Templater Settings effect cannot be applied to shape layers, so a shape you want to move has to be pre-composed first, with the effect applied to the pre-composition. And the effect only goes on the layer types that can be dynamic: text, solid, footage, pre-composition, adjustment and JSON. None of this is exotic, but each one costs time when you find it late.
Before you start
Prepare your project for layout rules
- Pre-compose any shape layer and apply the Templater Settings effect to the pre-composition
- Keep position properties combined, do not enable Separate Dimensions on layers you want Templater to lay out
- Apply the Templater Settings effect only to text, solid, footage, pre-composition, adjustment, or JSON layers
- Preview the shortest value and the longest value in each column before trusting the result
The five tools, and the question each one answers
The quickest way to choose is to stop thinking about tools and think about questions. Each tool answers one question about a layer.
Scale Factor answers: how big may this layer be? It rescales a layer to a percentage of its parent composition. A value of 100 percent makes the dynamic layer fill the composition. A value of 50 percent makes it half, and 25 percent makes it a quarter. This is the tool for a layer whose size is the problem. The reason to start here is that the other tools position a layer, and positioning a layer that is too large only relocates the overflow.
Align answers: where in its own composition does this layer live? You pick a side or corner of the parent composition and the layer anchors itself there. The options are Left, Left centered, Top, Top centered, Right, Right centered, Bottom, Bottom Centered, the four corners, and None Centered. A Padding field adds a cushion of pixels on the side or corner you chose, which keeps text from touching the edge of the frame. Two checkboxes refine it. Initialize to Center makes the layer start from the center before moving to its alignment. Consider anchor point measures the alignment from the layer’s anchor point instead of the edges of its bounding box. Align is the right tool when a layer’s home is a place in the frame, such as a name sitting in the bottom left, and it does not care what any other layer is doing.
Attach answers: which other layer does this one follow? This is the tool for relationships. You choose a sibling layer in the Attach to Layer drop down, then choose with Attach On which edge or corner of that sibling the layer should hug. The docs compare it to parenting, with one difference: it tracks the extents of a dynamic layer, so the attached layer follows the sibling’s bounding box as the data changes it. Two options matter in practice. Center on edges places the layer centered on the sibling’s edge. The Attach padding slider leaves a cushion of pixels along the attached edge or corner. One rule is written into the documentation as a warning: a layer cannot be attached to itself, and trying it produces unexpected results.
Chain answers: what if the followers have followers? A chain is a series of attachments. Layer b attaches to a along the bottom edge, c attaches to b, and d attaches to c. The point is that a change to one dynamic layer, the one at the start, cascades through every layer behind it. Chains are how a stack of text lines can follow the first line as its data changes.
Group answers: should the whole stack be treated as one object? Grouping takes the chain and lets Templater lay it out as a single unit instead of separate pieces. You assign each layer a Group Position: Cap for the first layer, Middle for the layers between, Base for the last. You also choose a Group Direction, vertical or horizontal. Vertical is the default, and a vertical group builds from top to bottom. Horizontal groups build from left to right. As of Templater 3.3 you can group dynamic comp layers horizontally or vertically, so check your version.
Five layout tools
Each tool answers one question
| Tool | Question it answers | Where it stops working |
|---|---|---|
| Scale Factor | How big may this layer be? | Does not position the layer |
| Align | Where in its composition does this layer live? | Does not track other layers |
| Attach | Which other layer does this one follow? | A layer cannot be attached to itself |
| Chain | What if the followers have followers? | One chain per composition |
| Group | Should the whole stack be one object? | One group per composition |
There is also a quiet sixth case, and the docs treat it separately. You can apply the Templater Settings effect to a layer that holds no data at all, such as a fixed logo, and then use it only for its transform properties. Templater adjusts where the logo sits and leaves its contents alone. That is how a static graphic follows a text layer whose width changes with each row. If that is your exact need, we wrote a separate walkthrough for making a graphic follow a changing text layer.
A worked example, labeled as hypothetical
The following is an illustration we constructed to show the decision order. It is not a customer project and the layer names are invented. Suppose you are building a lower third for event videos. It has a name line, a title line below it, and a small badge to the right of the name. Names vary from “Li Wu” to a long hyphenated name with a middle initial. Titles vary from one word to a full sentence.
Start with the largest unknown, which is size. Put Scale Factor on the name layer and on the title layer, each at a percentage of the composition width that leaves room for the badge. The reason to start here is that a layer that fits can be placed, and a layer that overflows cannot be fixed by placement. Set the percentage deliberately, because Scale Factor rescales the layer to that share of its composition, and 100 percent fills it.
Next decide the anchor. The name layer is the master. Align it to Bottom Left and add padding so the text clears the edge of the frame. Now the name has a fixed home and a bounded size, so its position is no longer a variable.
Then connect the followers. Attach the title layer to the name layer on its bottom edge. Whatever height the name takes, the title sits right under it. Attach the badge to the name layer on its right edge, with a little Attach padding. When a long name widens the layer, the badge slides right. When a short name narrows it, the badge slides back. You wrote the intent once.
Last, decide whether you need a chain or a group. If the name and title are the only two text layers, attachment is enough. If you add a third line, say an organization, you can attach it to the title, which makes a chain. If you then want the whole three-line block to be placed and handled as one object, you would give the first layer Cap, the second Middle and the third Base, with a vertical Group Direction. The reason to group is that the layout engine can then treat the block as a single object, rather than three independent ones that each react on their own.
Notice what the decision order was. Size first, then home, then relationships, then collective behavior. Skipping ahead is a sure way to make the system fight you. If you attach a layer that has not been scaled to a limit, you get a well-positioned overflow.
Decision order
Set layout rules in this order
-
Size firstPut Scale Factor on the layer.
-
Then homeUse Align to anchor the master layer to a side or corner of the parent composition, with padding so text clears the edge.
-
Then relationshipsAttach follower layers to the master layer.
-
Then collective behaviorIf a series of layers must stay in order behind one master, use a chain.
Checking the result, and knowing where to stop
You do not have to render to see whether the rules work. The Templater panel has preview features. In manual mode Templater pulls data from your source and updates every dynamic layer, and you step between consecutive rows with the arrow icons to see how each one lays out. Cycle mode steps through a range automatically. Two details from the docs matter here. Templater re-reads the data source each time you preview in manual mode, with no caching. In cycle mode it reads the source once before it begins, so data you add or change while cycling will not show up until you start again. Choosing a small range of rows makes previewing faster. For a fuller walk through the options, see our page on preview modes and spot checks.
The Preview uses dropdown also has a current state option, and the Magic Wand tool in the Transport area shows how the layout engine interprets your choices. When a result surprises you, look there first. It tells you what Templater thinks you asked for, which can differ from what you meant to ask.
Pick the rows to preview on purpose. A template that looks fine on the first ten rows has only been tested on whatever the first ten rows happen to be. Go find the shortest value in the column and the longest, and preview those. We would not call that a rule from our documentation. It is general practice, and it follows directly from how these tools work, since every tool is a response to a range of lengths and a range is tested at its ends.
Now the limits, stated plainly, because a decision guide that hides them is worse than none.
You can only have one group or chain per composition. If your design needs two independent stacks, such as a block at the top and a block at the bottom, the documentation says to pre-compose one group and then use that pre-composition inside another group in the parent composition. That works, and it also means you are now managing nested compositions, with rules that apply within each one. Our post on nested pre-comps and essential properties covers a related trap worth reading before you nest deeply.
Layout rules deal with geometry. They do not rewrite your words. If a font does not support the language of a row, the problem is not layout, and the fix is not here. With dynamic text styling, a font that is installed but does not support the text’s language means the text is not imported and nothing appears in the composition for that row. A font that is not installed gives the system default font on Windows and unexpected results on macOS. Direction and justification can also be set per row, and our guide to dynamic text styling explains how. If your template carries several languages, set those per-row styles and then test the layout rules on the longest row in each language.
Layout rules also cannot invent room that your design lacks. A frame that can hold a single short line has no good answer for a paragraph. Scaling text down to fit a small frame can leave it too small to read on a phone. That decision is a design decision. It belongs to you. The rules move and size layers, and judging legibility is still a person’s job.
Finally, if you need duration to flex instead of space, you are in the wrong place. Footage that arrives longer or shorter than the template expects is a timing question, and our page on time trimming picks up there.
The bottom line
Ask what each layer has to stay true to. If it must stay inside a size, use Scale Factor. If it must stay in a place, use Align. If it must stay beside another layer, use Attach. If a series of layers must stay in order behind one master, use a chain, and if that series should move as one object, make it a group. Set them in that order, scaling first, and preview the shortest and longest rows before you trust any of it.
Look beyond layout rules if you need more than one chain or group in a single flat composition, or if the text simply has no room. Templater gives you a layout engine that follows rules you write once. It does not give you a design that works at every length, and it never will. That part still starts with you. If you are setting up your first project, how to set up and use Templater inside After Effects is the right place to begin.
We covered the five tools and the order to use them in. Here are the questions that come up when people choose between them.
Frequently Asked Questions
Which Templater layout tool should I try first for text that varies in length?
Start with Scale Factor on the text layer. It limits the layer to a percentage of its parent composition, so you control how much of the frame it takes. Every other tool moves a layer, and moving a layer that is already too big only relocates the problem. Once size is bounded, use Align to give the layer a home and Attach to connect other layers to it.
How do I keep a logo from overlapping text that changes width?
Apply the Templater Settings effect to the logo layer, then attach it to the text layer. Choose the right edge in the Attach On drop down, and add Attach padding for a cushion. The logo needs no data of its own. Templater adjusts only its transform properties, so it follows the text layer’s bounding box as each row changes the width.
What is the difference between aligning and attaching a layer?
Align places a layer relative to its parent composition, such as the bottom left corner with some padding. Attach places a layer relative to a sibling layer, such as along its bottom edge. Use Align when the layer’s position depends on the frame. Use Attach when its position depends on another layer that changes size with the data.
Can I have two separate groups of layers in one composition?
No. A composition supports one group or chain. For a more complex layout, our documentation says to pre-compose a group and then use that pre-composition within another group in the parent composition. Keep in mind that layout rules are measured relative to each parent composition, so test the nested arrangement with your longest and shortest data.
Do layout rules work with shape layers or separate dimensions?
Not directly. The Templater Settings effect cannot be applied to shape layers, so pre-compose the shape and apply the effect to the pre-composition. Layout rules also will not function correctly for any layer property that has Separate Dimensions enabled, so keep position properties combined on layers you want Templater to lay out.
How can I check a layout before rendering a whole batch?
Use Templater’s preview. Manual mode steps through consecutive rows and updates the dynamic layers from your data source. Cycle mode steps through a range automatically, though it reads the data source once before it starts. Choose current state in the Preview uses dropdown, or click the Magic Wand tool, to see how the layout engine interprets your settings.
