Hi All,
I am implementing the Google map component in aem 6.3 ,The plain HTML code is working as expected, when I added the HTML in sightly and js in clientlibs the <sciprt> tag throws an error in js console, . Uncaught type error < in js .
Is their any other way to implement the Google map component in Sightly , any docs or links would be helpful
Thanks in advance
Solved! Go to Solution.
Views
Replies
Total Likes
You can use any JS/JQuery/Bootstrap lib in a HTL component. BTW - its not called Sightly. This is very straightforward. See this example -- Adobe Experience Manager Help | Creating an Adobe Experience Manager HTML Template Language componen...
Views
Replies
Total Likes
Hi,
you don't need to wrap your Javascript code in <script> tag, if you using clientLibs.
Thanks
Arun Patidar
Views
Replies
Total Likes
Hi Arun
I have to add the source url for Google map api
I.e <script src=https://googlemapapi.com > to load the map which I was not able to add.
Views
Replies
Total Likes
where are you adding this SCRIPT tag? in .html page or in clientlibs?
Views
Replies
Total Likes
Is there any other way to implement the map component without using script tag in js and sightly
Views
Replies
Total Likes
Without script tag , how would you add external Javascript.
though you can add external javascript from clientlibs using below:
$(document).ready(function(){
$('body').append($('<script src="/path/to/script/foo.min.js"></script>'));
});
OR
You can directly add <SCRIPT> tag in HTL
It is a simple javascript call, In your code there might be some syntax error.
Thanks
Arun
Views
Replies
Total Likes
We will try thanks for your quick response.
Views
Replies
Total Likes
You can use any JS/JQuery/Bootstrap lib in a HTL component. BTW - its not called Sightly. This is very straightforward. See this example -- Adobe Experience Manager Help | Creating an Adobe Experience Manager HTML Template Language componen...
Views
Replies
Total Likes
Thanks Scott ,It was helpful
Views
Replies
Total Likes
Views
Likes
Replies