Socket
Book a DemoInstallSign in
Socket

zpt

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zpt

Zenon Page Templates - JS (ZPT-JS)

latest
Source
npmnpm
Version
0.40.9
Version published
Weekly downloads
91
85.71%
Maintainers
1
Weekly downloads
 
Created
Source

ZPT-JS

Zenon Page Templates - JS (ZPT-JS) is a Javascript API that makes it easy to modify the DOM of a HTML document with no Javascript programming, using only some custom attributes. ZPT-JS is a javascript implementation of Zope Page Templates (ZPT). It is not a fully compliant implementation: there are some differences. Take a look at Zope2 book to learn about Zope Page Templates.

Core features of ZPT-JS are:

  • Easy to learn; clean, simple and consistent syntax.
  • A rich and powerful group of expressions available (string, query, logical, math, arrays, lists, ranges, function, method expressions...).
  • Don't break HTML! The HTML documents using ZPT-JS are valid HTML documents.
  • Makes it easy to designers maintain pages without having to abandon their tools.
  • Internal macro support; external asynchronous macro loading support.
  • I18n and L10n support using standards (Intl and ICU). External asynchronous i18n files loading support.

ZPT-JS and ZPT: similar but not equal

ZPT-JS is based on ZPT but it does not implement it at 100%: there are some important differences between ZPT-JS and ZPT.

Using ZPT we have:

  • the ZPT template (a HTML file with the ZPT tags inside)
  • the data
  • the final HTML file (the ZPT template combined with the data)

Using ZPT-JS:

  • the ZPT template (a HTML file with the ZPT tags inside)
  • the data
  • the final HTML file is the ZPT template! The DOM of the HTML page is modified depending on the tags in the ZPT template.

A main goal of ZPT-JS is not to break a valid HTML document. So, as HTML5 allows, instead of using TAL attributes ZPT-JS uses data attributes. This way tal:content attribute is replaced by data-content. However, ZPT-JS also supports standard TAL attributes (invoking zpt.context.useOriginalTags()).

Installation

ZPT-JS is registered as a package on npm. This is the recomended way of downloading it. You can install the latest version of ZPT-JS and its dependencies with the npm CLI command:

npm install zpt

Tutorial, reference and more

Take a look at ZPT-JS's home page for more details.

License

LGPL

Keywords

template

FAQs

Package last updated on 03 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.