[ic] Is there ANY way to get "[value xxx]" in "[item-data [valu e xxx] category]" to interpolate?

jojo@buchonline.net jojo@buchonline.net
Fri, 13 Oct 2000 10:17:21 +0200 (CEST)

On 12 Oct, Tim Murphy wrote:
> Hello all,
>     I know that the tags inside the search-list container tag only accept
> positional parameters and that a tag must be included in a named, quoted
> parameter to be interpolated for use inside another tag. I guess I'm hoping
> someone will tell me I missed something and what I'm trying to do is actually
> possible.
> I set a variable in a "va=var=value" construct ( database name, in fact), and
> I'm trying to use that name in a results page to deal with the multiple product
> databases I have (I need to limit a given search to a particular database).
> Unfortunately the [value xxx] doesn't get interpolated inside the [item-data...]
> tag, and so I'm stuck. If this is NOT possible, can anyone suggest a workaround,
> i.e. another way to, in effect, set the database that the results page (or any
> one of a number of pages I would really like to avoid hard coding) uses for a
> particular call? If I could do that then I could fall back to just using
> [item-field...] and the like and have it go to the database somehow defined as
> default for that one invocation.
> Many thanks,
> Tim Murphy

Maybe, you use a wrong IC tag? This works for me...

---snip a---------
[seti artist][data session arg][/seti]

[data table="[scratch Personendatabase]" column="ArtistSpalte1" key="[scratch artist]"]
[data table="[scratch Personendatabase]" column="ArtistSpalte2" key="[scratch artist]"]
[data table="[scratch Personendatabase]" column="ArtistSpalte3" key="[scratch artist]"]
---snip a---------


---snip b---------
[if scratch mv_locale eq de_DE]
[seti Personendatabase]Personen[/seti]
[seti kurs]DM[/seti]
[elsif scratch mv_locale eq en_US]
[seti Personendatabase]PersonenEnglish[/seti]
[seti kurs]US[/seti]
[seti test][db-count PersonenEnglish][/seti]

[elsif scratch mv_locale eq es_ES] 
[seti Personendatabase]PersonenEspanol[/seti]
[seti kurs]ESP[/seti]
[seti test][db-count PersonenEspanol][/seti]

[seti Personendatabase]Personen[/seti]
[seti kurs]DE[/seti]

[if scratch test =~ /Bad/]
[seti Personendatabase]Personen[/seti]

[seti test][/seti]
---snip b---------

Short summary:

I´ve a shop with several products tables with different languages.
If visitor get a results page about any artist and he choose another
language, IC switch the table ([scratch Personendatabase]) to show the
visitior the same artist in another language.

The codes above ("snip b") is for testing any value of mv_locale.
If there is a value like "de_DE", "en_US" or "es_ES", the codes will
set the scratch variables [scratch Personendatabase] to the right
existing products table. The code

[seti test][db-count PersonenEspanol][/seti]

counts the number of the datas from the (choosen?) database. If there
was any failure or problem and the table doesn´t exist, the codes

[if scratch test =~ /Bad/]
[seti Personendatabase]Personen[/seti]

will set the [scratch Personendatabase] to "Personen" (default).

I hope, you get the picture!


My suggestion is....make a test like

Test value: [value xxxx]

and see, what you get *before* you use that code inside of any another

Hans-Joachim Leidinger
buch online                 jojo@buchonline.net
Munscheidstr. 14            FAX: +49 209 1671441
45886 Gelsenkirchen         FAX: 0209 1671441