Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #716345

    Hi there,

    We are using the Google Maps shortcode to display a map with all the dealers of a client, but now the client has added more then 150 locations in the shortcode. I know this shortcode probarly wasn’t made for this kind of use, but its working just fine and all of the locations are added…

    The problem is that on the backend, you normaly get a list of all the adresses, with more then 150 locations this isnt ideal. So i found the code and added the city. I did this in the file : / config-templatebuilder / avia-shortcodes / google_maps.php on line 233.
    From
    $params['innerHtml'] .= "<div class='avia_title_container' {$template}>".__("Address", 'avia_framework' ).": ".$params['args']['address']."</div>";
    To
    $params['innerHtml'] .= "<div class='avia_title_container' {$template}> - ".$params['args']['address'].", ".$params['args']['city']." </div>";

    But the client filled the content/text field with the name of the dealer, is it possible to show this in the backend overview?
    I cant exactly trace where its coming from, but ive tried $params[‘args’][‘content’], $params[‘content’][‘content’], $params[‘content’][‘text’] etc etc…

    Any help would be appreciated, thanks!

    #717579

    Hi c3computers!

    Thank you for using Enfold.

    I’m sorry but I’m not sure what you’re trying to do here. What is the “$params[‘args’][‘city’]” for? I’m not sure if that’s going to work because the “city” parameter or variable does no exist by default. Are you trying to create a new input field for the “city” address? Edit the shortcode file, look for this code around line 74:

    								array(
    									"name" 	=> __("Full Adress", 'avia_framework' ),
    									"desc" 	=> __("Enter the Address, then hit the 'Fetch Coordinates' Button. If the address was found the coordinates will be displayed", 'avia_framework' ),
    									"id" 	=> "address",
    									"std" 	=> "",
    									"type" 	=> "gmap_adress"),
    
    

    Below, create a new input field that looks something like the following.

    array(
    									   "name" 	=> __("City", 'avia_framework' ),
    									   "desc" 	=> __("Enter the name of the city", 'avia_framework' ),
    									   "id" 	=> "moreinfo",
    									   "type" 	=> "input",
    									   "std" 	=> "",
    								   ),

    You can then replace the previous line with this one.

    $params['innerHtml'] .= "<div class='avia_title_container' {$template}>".__("Address", 'avia_framework' ).": ".$params['args']['address'].", ".$params['args']['moreinfo']."</div>";
    

    This will create a new field called “City” inside the “Edit Location” panel.

    Regards,
    Ismael

    #717880

    Hi Ismael,

    Thanks! This helps, the only problem is that the client already added the info that i wanted to show in the “content” field.

    So basicly i want to show this field :

    									 array(
    			                            "name" 	=> __("Marker Tooltip", 'avia_framework' ),
    			                            "desc" 	=> __("Enter some text here. If the user clicks on the marker the text will be displayed", 'avia_framework' ) ,
    			                            "id" 	=> "content",
    			                            "type" 	=> "tiny_mce",
    			                            "std" 	=> "",
    			                        ),

    In the overview.
    ".$params['args']['content']."
    Doesn’t work…any ideas?

    Thanks again!

    • This reply was modified 7 years, 11 months ago by c3computers.
    #720121

    Hi,

    Did you modify that line? The “type” parameter should be a “textarea”, not “tiny_mce”.

     array(
    			                            "name" 	=> __("Marker Tooltip", 'avia_framework' ),
    			                            "desc" 	=> __("Enter some text here. If the user clicks on the marker the text will be displayed", 'avia_framework' ) ,
    			                            "id" 	=> "content",
    			                            "type" 	=> "textarea",
    			                            "std" 	=> "",
    			                        ),

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.