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
Tip
To load an HTML fragment, you can use use loadhtml() (see
Skin/Formats/CrossReferencePrintFormat("loadhtml()Loads HTML content from the
specified HTML file. The file may be located inside the template (see
Skin/Formats/CrossReferencePrintFormat("Snippets" on page1)) or hosted on a Content
Management System or on another location outside the template.An optional selector
allows you to retrieve only the content of matching elements.The specified HTML file is
expected to be UTF-8 encoded.Loadhtml() is cached per batch run (based on the URL) in
print/email.To load a JavaScript file (.js) or a style sheet (.css) you can use loadtext(). See
Skin/Formats/CrossReferencePrintFormat("loadtext()" on page1).External content is not
loaded while editing a script. To test a script that loads external content, you can do a
preflight; see Skin/Formats/CrossReferencePrintFormat("Doing a Preflight" on
page1).loadhtml(location)Loads all HTML from the specified HTML file.locationString
containing a path that can be absolute or relative to the section/context. Use
snippets/<snippet-name> to retrieve the content from an HTML file residing in the
Snippets folder on the Resources panel. In order to retrieve files from outside the
template the file protocol is supported as well as the http/https protocols. The complete
syntax of a fully qualified URL with the "file" protocol is: file://<host>/<path>. If the host is
"localhost", it can be omitted, resulting in file:///<path>, for example:
file:///c:/somefolder/somecontent.html.When using the http/https protocol, remember that
only absolute paths are supported inside remote snippets (see
Skin/Formats/CrossReferencePrintFormat("Remote snippets" on page1)).To quickly get
the location of an HTML snippet in the template resources, right-click the snippet in the
Resources pane and select Copy Resource Location.The path to a remote HTML snippet
can be copied from the snippet's properties: right-click the snippet in the Resources pane
and select Properties.ExamplesThis script loads a local HTML snippet (from the
Resources panel) directly into the matched elementsresults.loadhtml
("snippets/snippet.html");The following script loads a local HTML snippet (Resources
panel) into a variable. The replaceWith() command is used to replace the element(s)
matched by the script's selector with the contents of the snippet.var mysnippet = loadhtml
('snippets/snippet.html'); results.replaceWith(mysnippet);Same result as the previous
script, but a different notation:results.replaceWith(loadhtml('snippets/snippet.html'));The
following script loads a snippet into a variable and finds/replaces text in the variable
before inserting the content into the page. The second find command also adds
formatting to the replacing text.var mysnippet = loadhtml
('file:///C:/Users/PParker/Documents/Example.html'); mysnippet.find('@var1@').text('OL
Connect 1'); mysnippet.find('@var2@').html('<i>OL Connect 2</i>').css('text-
Page 816










