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
To load a JSON snippet in script, use: loadjson(‘snippets/nameofthesnippet.json’).
For example:
var json_data = loadjson("snippets/snippet.json");
results.html(json_data.field1);
See also: "Writing your own scripts" on page389 and "loadjson()" on page814.
For an example in which JSON snippets are being used to localize a template, see this how-to:
Localizing templates using json.
Handlebars templates
In OL Connect, Handlebars templates are a special kind of snippets. Just like other types of
snippets (see "Snippets" on page281), Handlebars templates are stored in the Snippets folder
on the Resources pane, but their file name ends in .hbs.
Handlebars is the name of a JavaScript library that implements a templating language (see
https://handlebarsjs.com/). It uses a template and an input object to generate output.
Handlebars templates look like regular text with embedded Handlebars expressions. A
handlebars expression is a {{, some contents, followed by a }}. For example:
<p>Hello {{firstname}} {{lastname}}!</p>
When the template is rendered, these expressions are replaced with values from an input
object.
The Handlebars library is integrated in OL Connect Designer. This means that you can use
Handlebars expressions in this special type of snippets.
Working with Handlebars templates involves scripting. If you are new to scripting in the
Designer, first read:"Writing your own scripts" on page389.
Note
The information in this Online Help focuses on the implementation of Handlebars in OL
Connect. For general information about Handlebars and how to use it, see the following
Page 287










