Release Notes > 12.1.0.0 > Updates in This Release > Layout Editor > Layout Editor Files
  
Layout Editor Files
Introduction
In order to protect the template developer’s work, and to avoid users hacking the template code in a text editor, Layout Editor files are protected. This chapter provides information on how to create and use Layout Editor files and namespace files to be used with Layout Editor documents.
The Layout Editor document file has the .3le extension.
Templates for Layout Editor have the .3lf extension. If scripting relies on testing file extensions, this will need to be changed.
Namespace files for Layout Editor have the .3ln extension.
Creating Layout Editor Files
When creating templates or documents for Layout Editor, it is necessary to create these specific files. Layout Editor cannot open standard Layout Developer files.
When in Layout Editor, the normal ‘Save’ and ‘Save as...’ commands will save a Layout Editor file. There is no way in Layout Editor to create a .3d .3ns or .3f file type. Layout Developer can open Layout Editor files and save them either as Layout Developer or Layout Editor files. When working with a Layout Editor file in Layout Developer, using ‘save’ will keep saving that file as a Layout Editor file.
It is expected that once a template developer is happy with their document or template, they will create a Layout Editor version and give that to Layout Editor users. This can be done either on a server or desktop.
Layout Developer can create files for use with Layout Editor. The ‘tsavele’ macro and the FOM equivalent fTemplate.saveLE() method, will save the current document as a Layout Editor file. The title displayed at the top of the application window in Layout Developer will show this:
Notice the ‘[Encrypted]’ suffix. This suffix does not appear in Layout Editor. A “Save as...” menu option is also provided.
Saving a document as .3le will cause any linked files which hold content of protected tag types to be incorporated into the .3le file. Unprotected content will remain linked as normal, but it is recommended that links to external content, such as graphics and text, are broken to ensure the portability of the Layout Editor file. If namespaces are linked, a Layout Editor .3ln file will be created of that namespace and linked.
The fTemplate.saveLE() method can create copies of linked files and create a directory structure relative to the saved document, updating the link locations in the saved file to point to the local versions.
When using Publishing Engine to process jobs, if the target is for a Layout Editor user to finish the document, ensure that a Layout Editor file is saved.
Layout Editor Namespaces
In Layout Developer, namespace files are pretty much the same as documents and so Layout Editor has namespace files in the Layout Editor format. The file extension for these is .3ln and they can be created from Layout Developer using the tnsavele macro. When saving Layout Developer documents for Layout Editor with linked namespaces, Layout Developer will automatically create linked Layout Editor namespace files. Layout Editor does not have the facility to save out namespaces, but it does have the ‘load namespace’ option which will load (or link) a .3ln file.
Layout Editor Libraries
To ensure code protection, Layout Editor libraries are in a different format from Layout Developer libraries: all .3* files and .js files are required to be in the Layout Editor format. Rather than expecting users to create these by hand, libraries for Layout Editor can be created from within Layout Developer using the libsavele macro (and the FOM fLibrary.saveLE() method). The macro, when used on its own, will bring up a dialog box. As a macro or JavaScript method, it takes two parameters. The first is the name of the library installed in Layout Developer. The second is the path of new folder to create containing the protected version of the library. If a folder of the same name already exists at the location specified, a copy of that folder will be made and ‘.bak’ added to the name. The new folder will be completely new, no files will persist. Layout Developer can work with both Layout Editor libraries and Layout Developer libraries. Layout Editor will only load protected versions. Do not write the protected library to the same folder as the existing library, that’s just asking for trouble.