zimki | documentation | search
 
Zimki Documentation - Libraries.trimpath

Zimki provides access to the trimpath library. It decorates the zimki.render object with a trimpath method, that takes two arguments:

  • a template name, that is loaded from the Zimki template system class.
  • a dictionary of data that is passed to the template as parameters.

Example:

zimki.library.require("trimpath.js");

function trimpath_example( args ) {
  // pass the CGI paramters through to the template
  return zimki.render.trimpath( 'mytemplate', args );
}

zimki.publishPath( '/', trimpath_example );

The official trimpath homepage has more in-depth documentation.

Parent

Libraries