[ic] [loop search=] inside a [page scan=]
Fri, 15 Dec 2000 00:51:27 -0800
Thanks for the response, Mike. I read that FAQ already, but I probably
didn't understand it because I still can't get it working.
> FAQ, I am surprised no one got this:
[seti favorite_products][loop search="st=db/fi=favorites/se=[scratch
[comment]This sets favorite_products to
[page scan fi=products/sp=results/st=db/co=yes/sf=sku/se="[scratch
favorite_products]"]Products that are your favorite type![/page]
The above still doesn't parse the [scratch]. I'm trying by putting quotes
around the se= value. Is that the correct way to quote a [scratch] tag
inside a [page] tag? FYI, I'm still using 4.6.1-release.
Thanks for the direction,
Dan Browning - firstname.lastname@example.org
Courtesy copy of the FAQ:
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
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
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.