• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Fast Template (gallery-fast-template)

    Last Updated: 02/21/11
    + 0 -

    David Martin

    See 1 more by this user.

    Created: 02/15/11
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.3.0
    Free for use.

    Fast Template will take a set of JSON data, an HTML template on the document and a wrapper node. It will quickly loop over the rows in the data and process the html template for each row populating variables in the HTML template. The variables should be named the same as the key in the data. For example if the key in the data is first_name, your HTML would contain a variable called {first_name}. It will then be replaced with the value of the first_name key.

    • Tags:
    • json
    • drmartin
    • template
    • html
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Code Sample

    var myData = [ { 'first_name': 'foo' } ];
     
    var myTemplate = new Y.fastTemplate({
    	data: mydata,
    	templateNode: Y.one('#template'),
    	wrapperNode: Y.one('#wrapper')
    });
     
    myTemplate.process();
     

    Forum Posts

    Subject Author Date
    Using Fasttemplate Santhosh Nageshwar Rao 02/18/11
    Re: Using Fasttemplate Santhosh Nageshwar Rao 02/19/11
    Re: Using Fasttemplate David Martin 02/19/11
    Re: Using Fasttemplate Santhosh Nageshwar Rao 02/19/11
    Re: Using Fasttemplate David Martin 02/21/11

    © 2006-2013 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info