{{title}}
-
- {{{content}}}
+ {{#each posts}}
+
-{{/each}}
+ {{/each}}
+
```
As illustrated by the above example, there are four major types of template tags:
@@ -356,3 +358,24 @@ or equivalently `
+
- {{title}}
+
+ {{{content}}}
+
`. The HTML spec allows omitting some additional end tags, such as P and LI, but Spacebars doesn't currently support this. + +## Top-level Elements in a `.html` file + +Technically speaking, the `` element is not part of the Spacebars +language. A `foo.html` template file in Meteor consists of one or more of the +following elements: + +* `` - The `` element contains a Spacebars + template (as defined in the rest of this file) which will be compiled to the + `Template.myName` component. + +* `` - Static HTML that will be inserted into the `` element of the + default HTML boilerplate page. Cannot contain template tags. If `` is + used multiple times (perhaps in different files), the contents of all of the + `` elements are concatenated. + +* `` - A template that will be inserted into the `` of the main + page. It will be compiled to the `UI.body` component. If `` is used + multiple times (perhaps in different files), the contents of all of the + `` elements are concatenated. +