UNPKG

zpt

Version:

Zenon Page Templates - JS (ZPT-JS)

69 lines (59 loc) 2.5 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>ZPT-JS reference - Configuration - maxFolderDictionaries</title> <script type="module" src="../js/zpt.js"></script> <script type="text/javascript" src="../lib/syntaxHighlighter/lib.js"></script> <link rel="stylesheet" type="text/css" href="../docs.css"> <link rel="stylesheet" type="text/css" href="../lib/syntaxHighlighter/theme.css"> </head> <body> <div data-use-macro="'page@templates.html'"> <div data-fill-slot="'page-header'"> <h1>ZPT-JS reference - Configuration - maxFolderDictionaries</h1> <ul> <li><a href="#syntax">Syntax</a>.</li> <li><a href="#description">Description</a>.</li> <li><a href="#examples">Examples</a>.</li> </ul> </div> <article data-fill-slot="'article'"> <h2 data-attributes="id 'syntax'">Syntax</h2> <pre class="syntax"> maxFolderDictionaries ::= Integer </pre> <h2 data-attributes="id 'description'">Description</h2> <p> The <code>maxFolderDictionaries</code> defines the maximum number of <em>folder dictionaries</em> to preload. It is an integer value. </p> <p> Important! This configuration option must be used beside <a href="configuration-command.html">preload</a> command. It the command is not <em>preload</em> it will be ignored. </p> <p> For more details about <a href="../tutorial/folderDictionaries.html">folder dictionaries</a> read the tutorial. </p> <h2 data-attributes="id 'examples'">Examples</h2> <p> An example of ZPT-JS invokation using <em>maxFolderDictionaries</em> (reading a maximum of 5): </p> <pre class="brush: js; highlight: [11]"> import { zpt } from './zpt-esm.js'; var dictionary = { ... }; zpt.run({ command: 'preload', root: document.body, dictionary: dictionary, maxFolderDictionaries: 5, callback: function(){ zpt.run(); [your code here] } }); </pre> </article> </div> </body> </html>