{% id %}

Creates a "unique" identifier each time it is called. Each identifier consists only of lowercase letters, and each subsequent call simply increments it by 1 character (ie: 'aaa' -> 'aab' -> 'aac', etc...).

Identifiers created using this method are not random and therefore will not prevent caching. However, if the number of calls or arguments to any next_identifier call is changed the identifiers may not be consistent between calls - which means that you should not rely on identifiers created using this method for creating sharable links.

Syntax

{% id
[var|set|assign] new_variable_name
 
Specify a variable name in order to save the identifier to a variable. If not specified the identifier will be output to the template instead. The variable will be saved using the "var" behavior unless "set" or "assign" are specified.
output_to_template
 
If included, the identifier will be output directly to the template.
=
prefix:string
 
If included this will be added before the beginning of the generated identifier.
suffix:string
 
If included this will be added after the end of the generated identifier.
length:3
 
Determines the minimum length of the generated identifier. This is 3 characters by default but may be anywhere from 1 to 36 characters as desired. Ignored if skip is set.
skip:string
 
If included, the generated identifier will at a minimum be greater than the identifier supplied. Furthermore, the length argument will be ignored and the minimum length of the generated identifier will be set to the length of the skip argument.
%}

Examples

Generate Id

Copy
...

Save Id

Copy
...

Short Id

Copy
...

Long Id

Copy
...

Skip Id

Copy
{% for image in entity.images %}
...
{% endfor %}