![]() |
![]() |
![]() |
|
|||||||
| User interface Discuss eSyndiCat templates here. All the questions regarding eSyndiCat [FREE] Front end |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: Apr 2006
Location: UK
Posts: 1,095
![]() |
Just trying something out, I have created a field called Postcode (zipcode) I want to be able to get the information the user puts in and display it in Mapquest.
I.E. On the View link page i want to put a hyperlink using this code <a href="http://www.mapquest.co.uk/mq/maps/linkToMap.do?Postcode=SE3&country=GB&cid=lfmaplink">Map This Location</a> How would i be able to put in the {$link.postcode} shown in red, within the html code like this so when you clicked on the link it would input that info in rather than {$link.postcode} which is what i got. |
|
|
|
|
|
#2 |
|
eSyndiCat Lead Developer
Join Date: Apr 2006
Location: Kyrgyzstan, Bishkek
Posts: 6,596
![]() ![]() ![]() ![]() |
Hello Loren,
Please email me the letter with exact information. sten at esyndicat dot com Last edited by Sergey Ten; 08-01-2007 at 09:54 AM. |
|
|
|
|
|
#3 |
|
Join Date: Apr 2006
Location: UK
Posts: 1,095
![]() |
Hello Sergey
Well here is the link if that's what you mean http://www.mapquest.co.uk/mq/static/...est_maps_en.do |
|
|
|
|
|
#4 |
|
eSyndiCat Lead Developer
Join Date: Apr 2006
Location: Kyrgyzstan, Bishkek
Posts: 6,596
![]() ![]() ![]() ![]() |
Ok Loren,
Please follow directives: *** Open your view-link.tpl *** *** Find this code *** Code:
<tr>
<td><strong>{$lang.link_added}:</strong></td>
<td>{$link.date}</td>
</tr>
Code:
<tr>
<td><A HREF="http://www.mapquest.co.uk/mq/maps/linkToMap.do?address=100+Broad+Walk&city=London&Postcode={$link.postcode}&country=GB&cid=lfmaplink" target="_blank">Map This Location</A>
</td>
</tr>
|
|
|
|
|
|
#5 |
|
Join Date: Apr 2006
Location: UK
Posts: 1,095
![]() |
Thank You Sergey for this..and heres the but, that is exactly what i did. It doesnt work, it's the most logical thing to do.
Why, firstly this link does not show at all in the view-link.tpl page when called. Have no idea why. If i preview the link while editing, and click on link what happens is MapQuest's link page pops up, the Mapquest form displays the Postcode field, with {$link.postcode} rather than the actual information, and there is an error of course saying can't find it. Oh well am looking into how you could use PHP with this blasted thing.. I hate smarty some times ![]() |
|
|
|
|
|
#6 |
|
Join Date: Apr 2006
Location: UK
Posts: 1,095
![]() |
Okay this is what i have managed and if anyone is interested in putting a link to a map using info created in a field called postcode/zipcode, it will display that info in this form, which i have personally cut down to just the postcode and the button for my own purposes, but if you want the whole one here it is.
HTML Code:
<!-- MapQuest Start --> </FORM> <form action="http://www.mapquest.co.uk/mq/maps/linkToMap.do" method="post"> <input type="hidden" name="CID" value="lfmapwid"> </form></TD> <TD width="50%"> <FORM action="http://www.mapquest.co.uk/mq/maps/linkToMap.do" method=post name=linktomap> <DIV align=center> <TABLE style="FONT: 11px Arial,Helvetica" cellSpacing=0 cellPadding=3 border=0> <TBODY> <TR> <TD colSpan=2> <DIV align=center><a href="http://www.mapquest.co.uk/mq/home.do"> <img border="0" src="http://cdn.mapquest.com/mqstyleguide/ws_wt_sm" alt="MapQuest"></A></DIV></TD></TR> <TR> <TD colSpan=2>Address/Junction:</TD></TR> <TR> <TD colSpan=2><INPUT maxLength=80 name=address> </TD></TR> <TR> <TD colSpan=2>Location:</TD></TR> <TR> <TD colSpan=2> <INPUT type="text" maxLength=80 name=city value="{$link.location}" size="20"> </TD></TR> <TR> <TD>Post Code:</TD></TR> <TR> <TD> <input type="text" maxLength=12 size=10 name=Postcode value="{$link.postcode}"> </TD></TR> <TR> <TD colSpan=2>Country:</TD></TR> <TR> <TD colSpan=2><SELECT name=country> <option value=AT > Austria </option> <option value=BE > Belgium </option> <option value=DK > Denmark </option> <option value=FR > France </option> <option value=DE > Germany </option> <option value=IT > Italy </option> <option value=LU > Luxembourg </option> <option value=NL > Netherlands </option> <option value=ES > Spain </option> <option value=SE > Sweden </option> <option value=CH > Switzerland </option> <option value="GB" selected>United Kingdom</option> </SELECT> </TD> </TR> <TR> <TD style="TEXT-ALIGN: center" colSpan=2><INPUT type=submit value="Get Map"> </TD></TR></TBODY></TABLE></DIV></FORM><!-- MapQuest End --> Lastly if you want to change the country which is displayed first in my case UK. Which is like this: <option value="GB" selected> United Kingdom</option> If i wanted France to be highlighted first i would change: <option value=FR >France</option> to: <option value="FR" selected>France</option> One last tip..i couldn't get the code on the MapQuest Site to work straight off, in fact all it displayed was the country. The Above is the result of fiddling with their source code of their demo and their code to put in your page, so bare that in mind if you don't get it to work for the US one. |
|
|
|
|
|
#7 |
|
Join Date: May 2006
Posts: 172
![]() |
Loren - this is pure gold.
I am going to give this a right fiddle this weekend and if i get this to work, i'll start by jumping up and down on the same spot for a few moments. Then i'll send you a love letter, and then i'll do some more jumping...! Love Cris! |
|
|
|
|
|
#8 |
|
Join Date: Apr 2006
Location: UK
Posts: 1,095
![]() |
Gosh!I hope you will be able to always nice to go a little barmy when something works ![]() |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|