2022.1
Table Of Contents
- Table of Contents
- Welcome to PrintShop Mail Connect 2022.1
- Setup And Configuration
- System and Hardware Considerations
- Installation and Activation
- Preferences
- Clean-up Service preferences
- Database Connection preferences
- Editing preferences
- Email preferences
- Emmet preferences
- Engines preferences
- Hardware for Digital Signing preferences
- Language preferences
- Logging preferences
- Parallel Processing preferences
- Print preferences
- Sample Projects preferences
- Save preferences
- Scripting preferences
- Engines preferences
- Parallel Processing preferences
- Known Issues
- Uninstalling
- General information
- The Designer
- Designer basics
- Content elements
- Snippets
- Styling and formatting
- Personalizing content
- Preferences
- Clean-up Service preferences
- Database Connection preferences
- Editing preferences
- Email preferences
- Emmet preferences
- Engines preferences
- Hardware for Digital Signing preferences
- Language preferences
- Logging preferences
- Parallel Processing preferences
- Print preferences
- Sample Projects preferences
- Save preferences
- Scripting preferences
- Writing your own scripts
- Script types
- Creating a new Standard Script
- Writing a script
- Setting the scope of a script
- Managing scripts
- Testing scripts
- Optimizing scripts
- The script flow: when scripts run
- Selectors in Connect
- Loading a snippet via a script
- Loading content using a server's API
- Using scripts in Dynamic Tables
- Control Scripts
- Post Pagination Scripts
- Handlebars in OL Connect
- Translating templates
- Designer User Interface
- Designer Script API
- Functions and fields
- Example
- Functions and fields
- html()
- margins
- front, back
- Generating output
- Print Manager
- PrintShop Mail Connect Release Notes
- OL PrintShop Mail Connect Release Notes 2022.1.2
- License Update Required for Upgrade to OL Connect 2022.x
- Backup before Upgrading
- Overview
- OL Connect 2022.1.2 Improvements
- OL Connect 2022.1.1 Improvements
- OL Connect 2022.1 Improvements
- OL Connect 2022.1 Designer Improvements
- OL Connect 2022.1 Output Improvements
- OL Connect 2022.1 Print Manager Improvements
- OL Connect 2022.1 Improvements
- Known Issues
- Previous Releases
- OL PrintShop Mail Connect Release Notes 2021.2.1
- OL PrintShop Mail Connect Release Notes 2021.1
- OL PrintShop Mail ConnectRelease Notes 2020.2.1
- OL PrintShop Mail Connect Release Notes 2020.1
- OL PrintShop Mail Connect Release Notes 2019.2
- OL PrintShop Mail Connect Release Notes 2019.1
- PrintShop Mail Connect Release Notes 2018.2.1
- PrintShop Mail Connect Release Notes 2018.1.6
- PrintShop Mail Connect Release Notes 1.8
- PrintShop Mail Connect Release Notes 1.7.1
- PrintShop Mail Connect Release Notes 1.6.1
- PrintShop Mail Connect Release Notes 1.5
- PrintShop Mail Connect Release Notes 1.4.2
- Connect 1.4.2 Enhancements and Fixes
- Connect 1.4.1 New Features and Enhancements
- Connect 1.4.1 Designer Enhancements and Fixes
- Connect 1.4.1 Output Enhancements and Fixes
- Known Issues
- OL PrintShop Mail Connect Release Notes 2022.1.2
- Knowledge Base
- Legal Notices and Acknowledgements
Cloning a section
To clone a section, first use the clone() function and then add the clone to the Print context
before or after a specific section, using addAfter() or addBefore():
var printSections = merge.template.contexts.PRINT.sections;
var clone = printSections["Section 1"].clone();
printSections["Section 1"].addAfter(clone);
Cloned sections have the same properties as normal sections (see "section" on page964), but
they cannot call the section functions clone(), addBefore() and addAfter(), which means you
cannot clone a clone, or use a clone as a starting point to insert other clones into a template.
Note that with multiple clones, the next clone is always added after the previous clone.
With addBefore(), the code original.addBefore(clone1); original.addBefore(clone2); will
result in "clone1, clone2, original".
With addAfter() the code original.addAfter(clone1); original.addAfter(clone2); results
in "original, clone1, clone2".
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
CSSrules 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 page290) and personalization scripts (see "Variable Data" on
page347 and "Writing your own scripts" on page389).
The selector to use is: [section="name of the clone"].
Page 437










