DMXzone App Connect Support Product Page

Google Maps ......... how can I get an {{expression}} on a page to render in the

Asked 08 Jul 2017 12:02:56
1
has this question
08 Jul 2017 12:02:56 Reinhardt Ellis posted:
Google Maps ......... how can I get an {{expression}} on a page to render in the "view source"
+++++++++++++

App Connect does not yet support Google Maps.
So what i want to do is get the data to render on my page as it does.. (FRONT END WEBSITE)
BUT how does one let the data {{}} render as "TEXT" in the source code... (WHEN YOU RIGHT CLICK VIEW SOURCE)

Hard to explain....

What i have

{{google_api}} **// This shows the api // lets say for argument 123456789101112

So it renders on the FRONT END as 123456789101112

But when you view the source it only shows {{google_api}}

How do I get it to RENDER as TEXT inside the SOURCE code.. when i click view source..



+++++++ PHP Code ++++++++++ AND THEN THIS WORKS


<?php 
$map_api = "123456789101112";  
echo $map_api;  // SO this echo's out and you can see ... 123456789101112
?>
        
<script>
var initMapApi = "<?php echo $map_api; ?>";    // then this works like a charm
</script>



++++++ what i want to achieve +++++++++

<?php 
$map_api = "{{google_api}}";   // the above  123456789101112
echo $map_api;  //  This also echo's  123456789101112 .. so the php renders the ECO correctly from the {{google_api}} 
?>
        
<script>
var initMapApi = "<?php echo $map_api; ?>";  // BUT THEN THIS DOES NOT WORK ... theoretical if the above ECO is 123456789101112 then it should work...
</script>



is there not dmx-bind:render{{expression}} or something....?????

Because the only sulution i have is a LINK..
Passing the value as a VAR... to the next page to make the expression work on the map


<a dmx-bind:href="map.php?google_api={{google_api}}">

Reply to this topic