This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Learn » eZ Publish » ezjscore: eZ Publish JavaScript and...

ezjscore: eZ Publish JavaScript and Ajax framework

Wednesday 23 December 2009 7:45:21 pm

  • Currently 4 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Technical overview of ezjscore

We will start with a technical overview of ezjscore's configuration settings, PHP classes and template operators, and modules. This should serve as essential reference documentation, and its structure should be familiar to eZ Publish developers. Be sure to also read the INSTALL document that comes with the ezjscore extension.

Configuration (ezjscore.ini)

Note that the configuration of server-side Ajax functions is explained at the end of this article.

Packer = enabled | disabled | 0 | 1 | 2 | 3

Force JavaScript and CSS packer level, useful for debugging Apache rewrite rules. This is toggled on a general basis by the DevelopmentMode setting in the [TemplateSettings] block of site.ini, but can also be specifically controlled by this setting. A value of 0 means disabled; 1 is just merging the files to one file; 2 is merging and simple white space removal (the default setting if "enabled" is chosen), and 3 is merging and more complex white space removal.

LoadFromCDN = enabled | disabled

Setting to control whether jQuery or YUI 2.x / 3.x should be loaded from the Google or Yahoo! CDN or from the local server. The URL for the locations of the libraries are configurable by the ExternalScripts (CDN) and LocaleScripts settings described below.

PreferredLibrary = yui3 | jquery

A setting to hint about your preferred library to extensions that build on ezjscore and choose to support several. An example of that is ezstarrating, and we'll explain how that is done a bit later. The value here can be anything, but if you are aiming to publish code on, please support one of YUI 3.x or jQuery.

ExternalScripts[<script_identifier>] = <http_url>

List of external JavaScript libraries with their global CDN URL.

LocaleScripts[<script_identifier>] = <relative_path>

List of local JavaScript libraries. A relative path starting with "/" specifies that the file is in the root of the design folder rather than a path starting in the /javascript folder.

LocaleScriptBasePath[<script_identifier>] = <relative_path>

Local base script path, needed for YUI scripts.

FunctionList[] = <ezjscore/call/limitation_name>

List of permission functions that will be used by the eZ Publish permission system. This, as well as the block [ezjscServer_<name>], will be explained later in this article in "Creating Ajax server calls".


Printer Friendly version of the full article on one page with plain styles


Proudly Developed with from