…Sections in Dust also have the concept of something called context.…So, let's take a look a look at that in this example.…Here, in the snippets, scroll down under the chapter…five Dust section, to sections with paths and context.…And let's open up the DustContext_start file.…Okay.…You can see here that I'm going to be using the full version of Dust again, and…I've got an example where I, listening for the load event, calling renderTemplates.…Now, this is a little bit different than…the last example, so, same thing's up here.…I get the template content, compile it, load the source into the…Dust cache, but now I've got a data object that represents an employee.…But, there's a couple of interesting things going on here.…
First, there's a sub element in here called department.…And one of the things you notice is that there's two properties called name.…There's the employee name, but there's also the department name.…So, we have this data object with properties that are the same name.…And so, we're going to render the template into the document.…
- What is templating?
- Defining templates in jQuery Template
- Using simple Mustache templates with sections and conditions
- Adding conditionals and loops to Handlebars templates
- Working with Dust templates
Skill Level Intermediate
What is templating?5m 12s
2. jQuery Template
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.