[ic] Nested-IFS and Inner-IFS keep breaking

Viktors Rotanovs Viktors@Rotanovs.com
Sat, 28 Oct 2000 12:04:26 +0200


Hi,

this is old problem, and it exists even in Minivend. For complex
pages it's sometimes better to use usertags, they increase
readibility too. Or use embedded perl code.

By the way, [if]s are slow.

On Saturday 28 October 2000 12:02, you wrote:
> The following is a search page which is running on Interchange v4.5.6.
> After the third nested if this breaks. I have tested it as a single nested
> if and it works. I am just checking to see if my syntax is incorrect for
> the if-statement. The Construct store really doesn't have any nested-ifs in
> its pages, and the docs don't say much about them either.  Also, it breaks
> when you use logical operators more than once, such as [AND ...] and [OR
> ...].
>
> btw, congratulations on the 4.6 release!
>
> Thanks,
> Houman
>
> These values are sent to the search page:
>
> <FORM action=[area search] name=search_form method=GET>
>
> <INPUT TYPE=hidden NAME=mv_search_map VALUE="
> mv_searchspec=make
> mv_searchspec=model
> mv_searchspec=year
> ">
> <INPUT TYPE=hidden NAME=mv_search_field VALUE=make>
> <INPUT TYPE=hidden NAME=mv_search_field VALUE=model>
> <INPUT TYPE=hidden NAME=mv_search_field VALUE=year>
> <INPUT TYPE=hidden NAME=make VALUE="HONDA">
> <INPUT TYPE=hidden NAME=model VALUE="CIVIC">
> <INPUT TYPE=hidden NAME=year VALUE="1990">
> <INPUT TYPE=hidden NAME=mv_coordinate VALUE=1>
> <INPUT TYPE=hidden NAME=mv_search_page VALUE=search_mirrors>
>
> <INPUT BORDER=0 NAME="mv_submit" VALUE="Submit" TYPE=submit>
>
> </TD></TR></FORM></TABLE>
>
>
>
> Page Contents:
>
> [if value make eq "Make"]
>         [if value model eq "Model"]
>               [if value year eq "Years"]
>                    <br>select make you haven't select anything<br>
>               [else]
>                    year
>               [/else]
>               [/if]
>          [else]
>               model
>          [/else]
>          [/if]
>
> [elsif value model eq "Models"]
>             HONDA
> [/elsif]
>
> [elsif value models eq "Years"]
>             HONDA,CIVIC
> [/elsif]
>
> [else]
>             HONDA,CIVIC,1990
> [/else]
> [/if]
>
> Resulting Output:
> CIVIC
>
> 1990
> year [/else] [/if] [else] model [/else] [/if] [elsif value search2 eq "All
> Models"] make [/elsif] [elsif value search3 eq "All Models"] make,model
> [/elsif] [else] make,model,year
>
>
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@www.minivend.com
> http://www.minivend.com/mailman/listinfo/interchange-users

-- 
Best Wishes,
Viktors Rotanovs
I create websites that attract more clients. http://riga.nu/
Riga Latvia +371, Phone/Fax 7377-472, GSM 9173-000