Adding a nested template example

I added a working example of a nested template to the documentation. I also added JavaScript syntax highlighting to the code examples.