mugojstools

UNIX name Owner Status
mugojstools Mugo.ca stable
Version Compatible with
N/A N/A
This extension provides JavaScript template operators for eZ Publish template files.

mugojstools

This extension provides JavaScript template operators for eZ Publish template files.

Installation

  • Clone to your extensions/ directory
  • Activate in site.ini.append.php: ActiveExtensions[]=mugojstools

Included Operators & Usage

{mjs_console_log()}

This operator generates a JavaScript console.log() dump in the browser console. Requires ezjscore.
Screenshots:
Usage:

You can pass (or pipe) a string

{mjs_console_log("Foo!")}

a variable,

{def $foo="Bar!"}
{mjs_console_log($foo)}

a hash or object,

{def $foo=fetch( 'user', 'current_user' )}
{mjs_console_log($foo)}

or a node (complete with data_map):

{def $foo = fetch( 'content', 'node', hash(
'node_id', 123
))}
{mjs_console_log($foo)}

Contributors

License

MIT License. Copyright (C) 2016 Mugo Web.

No news yet.

This project has no reviews yet. Be the first one to review it!

No forum messages yet.