[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] loop-code, loop-field
Selection question: OPTION VALUE [loop-code] selects, [loop-field name] doesn't
This is from the simple demo. The category selection (code below)
seems to look for the first field in the cat.txt file and select it.
Later the simple demo searchs the products file for items belonging to
the category selected from cat.
The problem seems to be that the field selected in cat and searched
for in products does not exist in products. The "name" field does.
When I change
<OPTION VALUE="[loop-code]">[loop-data cat name] to:
<OPTION VALUE="[loop-field name]">[loop-data cat name]
all categories are returned. Maybe OPTION VALUE is left with the
previously assigned value: ""
I can add the "code" field to products or change the "code" field in cat
to match a field in products to make the search work right but neither
is really satisfactory. What I would like to do is to make OPTION
VALUE be the "name" and not the "code" field.
Code follows:
<OPTION VALUE="">All categories
__TIMED_CATOPT__
[loop search="fi=cat.txt/ra=yes/un=yes"]
<OPTION VALUE="[loop-code]">[loop-data cat name]
[/loop]
__END_TIMED__
</SELECT>
cat.txt follows:
code sel name which_page sort display_type image image_prop banner_image banner_text link_type url tab page search selector link_template
O1 O1 Abstract 00 Abstract Gallery simple products category=Abstract
O2 O1 Expressionists 00 Expressionist Gallery simple products category=Expressionists
O3 O1 Impressionists 00 simple products category=Impressionists
O4 O1 Americana 00 Americana Gallery simple products category=Americana
O5 O1 Renaissance 00 simple products category=Renaissance
O6 O1 Surrealists 00 name Surrealist Gallery complex products fi=products
st=db
co=1
sf=category
se=Surrealists
op=eq
nu=0
ml=5
tf=artist
to=x category=Surrealists
O7 O3 MOMA -1 external http://www.moma.org products
O8 O3 Museum of Bad Art 02 external http://glyphs.com/moba/ products
O9 O3 Artchive 00 external http://www.artchive.com products fi=products
co=1
sf=title
se=y
op=rm
nu=0
su=1
ml=50
O10 O2 Documentation 00 Interchange Documentation simple products category=docs
O11 O2 T-Shirts 00 Wearables simple http://store.steppenwolf.com products category=shirts
Kirill Sapelkin
znanie@best.com
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users