Skip to content
mediavrog edited this page Nov 21, 2010 · 5 revisions

Installation / Setup

Pick the right package according to the framework you want to use on the download page. Then …

Include required files

Include the *css in the <head>*-section:

<link rel="stylesheet" type="text/css" href="css/cfe.css">

Add the javascript files right before the (closing) </body>-tag, so your visitor will see the layout fast. I recommended to use the library file provided in the CFE download package (cfe.js: uncompressed for debugging – cfe-min.js: yui compressed for production):

<script src="js/cfe/cfe-min.js" type="text/javascript"></script>

Feel free to create your own compressed version of cfe with the modules you like or add the javascript files uncompressed one by one to your site. If you do so, please mind the dependencies.

Configure and run CFE

To initialize cfe and let the magic happen, you might just use this simple code:

window.addEvent('domready', function(){
  new cfe.Replace().engage();
});

Note: window.addEvent(“domready”) is mootools specific code; you’ll have to replace it if you’re using a different framework.

For more options, refer to the cfe.autostart.sample.js and/or read the docs.

Tip: If you want to further decrease the bandwith usage of cfe, GZip the compressed file before serving