2022.1

Table Of Contents
Renaming a clone
By default, clones receive the name of their source section with a "Clone {unique identifier}"
suffix, for example:
Source: "Section 1"
Clone Name: "Section 1 Clone 71c3e414-fdf3-11e8-8eb2-f2801f1b9fd1"
Use the name property to assign another name to the cloned section, for example:
clone.name = "my_section_clone";
Just like section names, the clone's name should be unique - within the scope of a single
record, that is; across records, the same name can be used.
When two clones get the same name in the same record, one of the clones may no longer be
used. This is prevented by giving clones unique names. Unique names also ensure that
CSSrules and scripts can target a specific clone.
Targeting elements in a cloned section
Clones that have a unique name can be further personalized with the use of CSS style sheets
(see "Styling and formatting" on page785) and personalization scripts (see "Variable Data" on
page846 and "Writing your own scripts" on page918).
The selector to use is: [section="name of the clone"].
The following CSS style rules target the <h1> element in a number of clones and assign the
respective text a different color:
[section="my_section_clone_0"] h1 { color: red; }
[section="my_section_clone_1"] h1 { color: green; }
[section="my_section_clone_2"] h1 { color: blue; }
The same selector could be used in personalization scripts:
Selector: [section="my_section_clone_0"] h1
Script: results.css('color','red');
Inside a Standard Script, cloned sections can be found using merge.section:
if (merge.section == "my_section_clone_0") {
results.html("Clone!");
} else {
Page 967