[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: How do I handle CGI appended information?
****** message to minivend-users from Frank Miedreich <miedreich@acm.org> ******
>****** message to minivend-users from "JR" <jr@mail.org> ******
>
>Hi again
>
>Getting there now!
>
>Could anyone tell me how to sort this (to me major) problem out? If I can
>sort this, then I will have an entirely virtual-page store from beginning to
>end.
>
>I have one store, but it has to display pages for two different divisions of
>a company. To open the front page as a single virtual page (front_page.html)
>but with a different [body] for each company, I need to be able to pass some
>sort of info in the initial calling string, like:
>
>http:www.mycompany.com/cgi-bin/store/front_page?first_company_design
>
>or
>
>http:www.mycompany.com/cgi-bin/store/front_page?second_company_design
>
>and then read that in the front_page.html to do and [if] first_company [body
>1] [else] [body 2] [/else] [/if] sort of thing.
>
>Please could someone tell me how to do this with Minivend??
>
>Thanks again
>
>Jerry
>
If you come from outside minivend call the page with
http://www.mycompany.com/cgi-bin/store/front_page?;second_company_design;
inside mvend pages: [page href="frontpage" arg="first_company_design"]
The variable is accessable from minivend via [data session arg].
You could do:
[if session arg]
[set name="design" interpolate=1][data session arg][/set]
[/if]
at the top of your front_page and then display via
[if type="value" term="design" op="eq" compare="first_company_design"]
[then]
first company things
[/then]
[else]
second company things
[/else]
[/if]
The variable design will be accessable on all subsequent pages, so you will
not need to pass the argument again, until you change the division.
If you need the info on the front-page only, you would of course not need
to store the session arg in a value first.
Depending on your situation, you might want to consider creating a
subcatalog, otherwise you will get lots of really complicated if-then-else
stuff.
look at the docs for this. a new G3 PowerMac has entered my office. Yes!
Cheers, Frank
--
Frank Miedreich
Max-Planck-Institut fuer psychologische Forschung
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list