Hi there. I changed the explanation of a couple of the advanced examples -- just two things I didn't quite understand at first, and thought could be clarified.
After trying unsuccessfully to use def.loadfile() to bring in a partial, I did a search of the source and found it was meant as an example of how to augment def, so I thought it might be good to indicate that loadfile() isn't a built-in function.
Ummm, what else... I added a description of the two runtime conditionals at the end, and added an example of a loop.
Added/modified the description of a few examples, plus a loop example
loadfile() would have to be accessible in the local context. It would not be found in the def associative array. doT strips off the 'def.' in definition directives before evaluating the remainder (assuming a matching string is not found in the def aa - in which case the directive is ignored - there's no way to change a value once it is set in the def aa).
Seems like most of the examples, excepting withdoT.js, are missing some setup to make them work properly.