How does text templating work?

Text substitution for your designs titles and descriptions

Jeff Schnitzer avatar
Written by Jeff Schnitzer
Updated over a week ago

OrbitKit provides a template mechanism that allows you to customize the titles and descriptions of designs when they are published. You can embed special tokens directly in the title or description of the design, or you can create templates in your blueprints which also use special tokens.

Tokens Allowed In Design Titles

The following tokens can be embedded in design titles:

  • {{tag1}}, {{tag2}}, {{tag3}} etc - the tag, from the design's list of tags. All lowercase.

  • {{Tag1}}, {{Tag2}}, {{Tag3}} etc - same as above, but each word will be capitalized.

  • {{product}} - for platforms that publish one product per exhibit (Printful, Printify), this will become the product name (eg "unisex t-shirt"). 

  • {{Product}} - same as above, but each word will be capitalized.

Tokens Allowed In Design Descriptions

  • All of the tokens allowed in Design Titles

  • {{title}} - the full title of the design, including any token substitutions

  • {{productDescription}} - for platforms that publish one product per exhibit (Printful, Printify, Etsy, Shopify), this will become a lengthy multiline description of the product (eg, "Soft stretchy 100% cotton...").

  • {{sizeChart}} - for Shopify, this will become an HTML size chart for the current product. No effect for Etsy, which cannot display HTML and uses a size chart image instead. No effect for other platforms.

  • {{tags}} - a comma separated list of the tags used for the exhibit

  • {{Tags}} - a comma separated list of tags, capitalized

Tokens Allowed in Blueprint Templates

  • For the title template, all of the tokens allowed in Design Titles

  • For the description template, all of the tokens above plus {{description}}, which is the rendered design description.

  • {{Title}} (uppercase T) will capitalize every word in the title text.

Blueprint templates override the design title & description. If you do not specify {{title}}/{{Title}} in your blueprint title template, or {{description}} in your blueprint description template, the original design text will be thrown away.

{{title}}/{{Title}} in the blueprint description template will provide the title from the design (with any token substitutions), without having been processed by the blueprint title template. See the examples below.

Empty Tokens and Alternate Text

When a token does not produce any content (say, because there is no {{tag5}}), OrbitKit strips out the token. This may not always be desirable; for example, consider this design description:

Buy this cool {{tag1}} {{product}}!

If you are publishing a Printful exhibit, it might be "Buy this cool dog t-shirt!". But published to Redbubble, there is no 'product', so it would render as "Buy this cool dog!"

To avoid this, you can provide alternative text by using a | (pipe character) in the token:

Buy this cool {{tag1}} {{product|design}}!

If there is no product, the alternative text will be used. "Buy this cool dog design!" The alternative text can contain spaces, newlines - anything up to the closing }}.

Special Case

If you do not perform any templating on your titles (no {{ in the design title, no blueprint title template), OrbitKit will automatically append the capitalized product name to your title if a product name is relevant (Printful and Printify).

That is, if you have a title "Dog Lover", when publishing a tshirt with Printful it will render as "Dog Lover Unisex T-Shirt". This is almost always what you want. If you use text templates, we assume you know what you're doing and do not automatically add the product name.

Example Use Cases

There are many things you can do with these templates. Some examples:

Generic Descriptions for Lazy Marketers

Maybe you don't really care about the descriptions of your designs, and the idea of going through thousands of designs to craft careful messages gives you carpal tunnel syndrome just thinking about it. Instead of making a single generic description, you can tailor it:

This {{tag1}} {{product|design}} makes a great gift for the {{tag2}} lover in your family!

{{productDescription}}

This could be a blueprint template (in which case your design descriptions will be ignored), or you could bulk set this as the design text itself, allowing you to customize text for the handful of designs that you really care about.

Special Product Titles

Amazon takes issue with some titles that suggest trademark associations. For example, you can get in trouble with Printful's (and OrbitKit's) default title behavior WRT phone cases: "Dog Lover iPhone Case" is not ok, but "Dog Lover Phone Case (fits iPhone)" is ok.

You can change your Printful iPhone case blueprint to include this title template:

{{title}} fits iPhone

Now any designs published with this blueprint (always iphone cases) will have a title that matches this pattern.

Concrete Examples

Example input:

Design Title

{{Tag1}} eaters

Design Description

This will be ignored

Design Tags

broccoli, food

Blueprint Template Title

{{Title}} Tee

Blueprint Template Description

{{title}} are green

Produces:

Published Title

Broccoli Eaters Tee

Published Description

Broccoli eaters are green

Take note:

  • Tag numbering begins at 1. {{Tag1}} is the first tag.

  • Capitalizing the {{Title}} and {{Tag1}} tokens causes words to be capitalized.

  • Since the blueprint template description does not include {{description}}, the original design description is discarded.

Did this answer your question?