Why Are There $ In Some Tags And Not Others?
Question
I see that in the examples in the documentation, some tags use $ and some don't. What is the difference?
Answer
There are two basic types of Movable Type tags: variable tags and container tags. Movable Type allows you to put $ in variable tags to distinguish them from other HTML tags if you wish, but these are purely optional: the system will still process the tags correctly without the $. You cannot use $ in container tags.
A variable tag is a substitution tag. It is a placeholder for a dynamic piece of information. You can include the optional $ in variable tags and they will still be recognized by the system.
For example, the MTEntryTitle tag is replaced with the title of the entry; so it is a variable tag which can be written as either <MTEntryTitle> or <$MTEntryTitle$>.
A container tag contains what might be called a subtemplate, a chunk of text and some Movable Type tags between two other Movable Type tags: the start of the container and the end of the container. MTEntries is an example of a container tag:
<MTEntries>
<$MTEntryTitle$>
</MTEntries>
Since a container tag has both a start and end tag, if you use $ in these, Movable Type won't be able to recognize the end tag. So you should only use $ in variable tags for this reason.


