|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
suncrew Smarty Rookie
Joined: 30 Aug 2013 Posts: 5
|
Posted: Fri Aug 30, 2013 7:11 pm Post subject: Load different TPL files if option selected |
|
|
Hello. This is my first question in this forum.
I have SVG maps, which divided in individual TPL files.
I have page with advanced search form - Example: www.website.com/advanced-search.html
From left side of search form I have div element with map.
I also have map of one country in homepage. I want when user click in one region in homepage map to redirect him to advanced search form and include the region map that user click.
How to do this?
Thanks for all the answers in advance |
|
Back to top |
|
suncrew Smarty Rookie
Joined: 30 Aug 2013 Posts: 5
|
|
Back to top |
|
TheOddPerson Smarty n00b
Joined: 19 May 2013 Posts: 3 Location: Canada
|
Posted: Tue Sep 03, 2013 4:20 pm Post subject: |
|
|
It's basic php.
Code: |
if (isset($_GET['map'])) {
switch($_GET['map']) { //Gather data sent to php from browser
case null:
//no data (url typed in address bar / bookmark
$smarty->display('blank.tpl');
break;
case '1':
$smarty->display('map1.tpl');
case '2':
$smarty->display('map2.tpl');
}}
|
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|