Fork Me on GitHub

EEJS

An ExpressionEngine extension that provides access to EE settings and resources from client side JavaScript libraries.

Download this project as a .zip file Download this project as a tar.gz file

EEJS is a javascript library that helps you to develop ExpressionEngine add-ons by giving you easy access to EE settings and channel information from within your javascript library.

Currently early in development, the aim of this library is to open up information within the ExpressionEngine installation so that it can be easily consumed by JS libraries.

Examples:

eejs.config('webmaster_email'); 
// webmaster@example.com

eejs.action('Member', 'register_member');   
// 10 

eejs.templateUrl('foo/bar')                 
// http://example.com/index.php/foo/bar/

eejs.actionUrl('Member', 'member_login')    
// http://example.com/?ACT=15

eejs.cpUrl({C:'content_edit'})              
// http://example.com/system/index.php?S=ce589fec13376e2bfa5d058116b&D=cp&C=content_edit

Installation

The library is packaged as an ExpressionEngine extension.

Documentation

Sorry, but this is still to be done.

If you have time on your hands, or are insanely interested, you can have a look through the behaviour tests system/expressionengine/third_party/eejs/tests/spec/EejsSpec.js to see how the module currently works!

If you're feeling super helpful you could even fork, write some documentation and submit a pull request!