Gossamer Forum
Home : Products : Gossamer Links : Discussions :

sending variables to the URL

Quote Reply
sending variables to the URL
good morning,

I have set up a multilanguage directory so far that you can choose the display either all language links or some or just one where all three langugages are displayed.

Currently i'm changing by hacking the URL itself, but how can i let the user choose which languages he want's to see. I was thinking about checkboxes, but how to send the selection to page.cgi in the URL?
Also the checkboxes should of course display the curent selection from the &lang=hu+en+de variable.

should this be done by a cookie? if yes how?
if not how else? :-)

thanks for help.

Last edited by:

Jagerman: Apr 7, 2006, 5:47 PM
Quote Reply
Re: [lapinkulta] sending variables to the URL In reply to
I haven't tried this but if you go to admin>setup>Build Options you can find the field called dynamic_preserve. I guess that if you add lang to this list, the value should be saved in the url if you're using dynamic pages.

Laura.
The UK High Street
Quote Reply
Re: [afinlr] sending variables to the URL In reply to
thanks. that works fine.

but how can i get the selection of the check boxes to the URL by loading the same page, just with another language option?

how can links remember the selection of a user for the next time?

greetings

Last edited by:

Jagerman: Apr 7, 2006, 5:54 PM
Quote Reply
Re: [lapinkulta] sending variables to the URL In reply to
hi, I'm still having problems with that.

Pages are generated dynamically.
I have put the following in the header:

<form action="<%db_cgi_url%>/page.cgi" method="GET">
<input type="hidden" name="g" value="<%g%>"> (that the category stays)

(for the template selection)
<select name="t" size="1">
<option value="hu">magyar</option>
<option value="en" SELECTED>english</option>
<option value="de">deutsch</option>
</select>


(for the language selection of the links to be displayed)

<input type="checkbox" name="lang" value="hu"><img src="<%build_images_url%>/hu.gif" alt="" width="24" height="12" border="0">
<input type="checkbox" name="lang" value="en"><img src="<%build_images_url%>/en.gif" alt="" width="24" height="12" border="0">
<input type="checkbox" name="lang" value="de"><img src="<%build_images_url%>/de.gif" alt="" width="24" height="12" border="0">
&nbsp;<input type="submit" value="change">

</form>

_________________________________________________

basically if i select another template it adds a second t= string to the URL and if i select some lang= option it adds every option seperately so that only the last one is recognized somehow.

can anybody help me.

i believe it's a stupid newbie question, but that's how we newbie's are. sorry.

greetings

Last edited by:

Jagerman: Apr 7, 2006, 5:54 PM
Quote Reply
Re: [lapinkulta] sending variables to the URL In reply to
hmmm.... didn't believe this one is so difficult for you guys. I guess I have to get a support ticket to continue from here.

better next time
greetings

Last edited by:

Jagerman: Apr 7, 2006, 5:53 PM
Quote Reply
Re: [lapinkulta] sending variables to the URL In reply to
ok, thanks to alex i have a working solution now for this. I post it also for future reference:

In the header is the language selection:

Quote:
<form action="<%db_cgi_url%>/page.cgi" method="GET">

<%if g%><input type="hidden" name="g" value="<%g%>"><%endif%>
<td bgcolor="#EEEEEE" align="right">

<font color="#3E3E3E"> <strong>change interface language:</strong>
<select name="t" size="1">
<option value="hu" <%if t contains 'hu'%>SELECTED<%endif%>>magyar</option>
<option value="en" <%if t contains 'en'%>SELECTED<%endif%>>english</option>
<option value="de" <%if t contains 'de'%>SELECTED<%endif%>>deutsch</option>
</select>
<br>
<strong>display links:</strong>

<input type="checkbox" name="hu" value="1" <%if hu contains 1%>checked<%endif%>><img src="<%build_images_url%>/hu.gif" alt="" width="24" height="12" border="0">
<input type="checkbox" name="en" value="1" <%if en contains 1%>checked<%endif%>><img src="<%build_images_url%>/en.gif" alt="" width="24" height="12" border="0">
<input type="checkbox" name="de" value="1" <%if de contains 1%>checked<%endif%>><img src="<%build_images_url%>/de.gif" alt="" width="24" height="12" border="0">




&nbsp;<input type="submit" value="change">

In the SETUP -> Built Options -> dynamic_preserve I just have the value d (as the user can change the template "t" himself it would be double added to the URL - same with the languages)

So, this works now pretty well.

Greetings

Last edited by:

Jagerman: Apr 7, 2006, 5:53 PM