+ Reply to Thread
Results 1 to 2 of 2

Thread: Load different TPL files if option selected

  1. #1

    Post Load different TPL files if option selected

    Hello. I create different maps for each city in advanced search.

    How to make in Smarty code to include tpl file with map.

    I have a dropdown with cities and maps for all cities.

    I want when select New York to include tpl file with map of New York city.

    Thanks for help.

  2. #2
    To load tpl file on dropdown change you need xajax function which will do this.

    You can do xajax function based on other functions in the script. there are just few mandatory things to make it working properly

    1. Create function somewhere in the class file. for example in the rlCategories.class.php

    PHP Code:
    Only registered members can view the code
    2. Register function in the place you need it. if you want your maps on home page only than right place is controllers/home.inc.php

    PHP Code:
    Only registered members can view the code

    3. use it in the javascript like below

    Code:
    Only registered members can view the code.

    It's not ready instruction and just some detailed thoughts about xajax and how this can be done.

+ Reply to Thread