[ic] [loop search=] inside a [page scan=]

Dan db@cyclonehq.dnsalias.net
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:
>
>     http://developer.akopia.com/cgi-bin/ic/docfly.html?mv_arg=faq05%2e07

[seti favorite_products][loop search="st=db/fi=favorites/se=[scratch
user_favorite_type]/sf=favorite_type"][loop-data favorites
product_sku]|[/loop]nada[/seti]
[comment]This sets favorite_products to
"771100|10325|10341|770001|nada"[/comment]

[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 - danb@cyclonecomputers.com
----
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
[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.