How can I tell when I need to quote a tag inside a tag?

### Index Up << >>

## How can I tell when I need to quote a tag inside a tag?

In general, you don't need to quote the following tags which are interpreted first within a list:

        [item-code] [item-data ...] [item-field ...] etc.
        [loop-code] [loop-data ...] [loop-field ...] etc.
        [foo-code]  [foo-data ...]   [foo-field ...] etc.

This is because they are interpreted as a part of the surrounding `[loop]`, `[item-list]`, `[search-list]`, `[sql list]`, or `[tag each table]` constructs.

So this will work:

        [item-list]
        [page [item-field url]]detailed info[/page] on [item-description]
        [/item-list]

This will not work:

        [page [value mypage]]

The [value ...] tag is not interpolated before page, and the parser will not know to do so. It needs to be instead:

        [page href="[value mypage]"]

Clear as mud, right? Well, at least if you quote them all you can't go wrong. 8-)

You might wonder why unquoted tags are even allowed. The answer is performance; if you have large lists of tags you can achieve significant speedups by using positional parameters. It requires CPU power to parse and disassemble the named parameters.

### Index Up << >>