Developer forum

Forum » CMS - Standard features » Maps module
Thomas Schroll
Reply

Hi

I'm working on a website where the map is the footer. Instead of placing the module on every page, I'm trying to include the footer with @RenderPageContent("footerPageID"). I can see information about the user but the map is not rendered. If I place the module on the page (not footer), the map also shows in the footer.

Does anybody have an idea for a solution or an idea to where I can find the error?

Regards Thomas


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Thomas

You would have to use the javascript console to see what is happening. It is 'just' a Google maps javascript doing some stuff, so check if errors occurs.

Map in the footer on every page... Hm, does that makes any sense? Or does it just looks nice?

 
Thomas Schroll
Reply

Hi Nicolai

Thanks. I don't get any errors, but if there's no structural dw problems inserting the map that way, I will go through the code again and look for the problem.

In this case it makes sence. One of the main goals of the website is to show partners and their location in the area. Instead of placing a link on every page to the map, we are placing the map in the footer with a link to the map (page where the map is inserted with lists of partners). I hope to show the customer's info on the map instead of the address as nomally seen in the footer of webpages.

Regards Thomas

 
Thomas Schroll
Reply

Hi

I contacted support at as it turns out, it is not possible to insert the map with @RenderPageContent.

Does anybody know a workaround besides inserting the module on every page or using iframe?

Regards Thomas

 
Mikkel Ricky
Reply

@RenderPageContent does not include the Stylesheet and JavaScript selected in the general module settings. To work around this you have to manually add something like this 

<link rel="stylesheet" type="text/css" href="/Files/Templates/Maps/stylesheets/Maps.css" />
<script type="text/javascript" src="/Files/Templates/Maps/javascripts/Maps.js"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?v=3&amp;sensor=false"></script>

in your Maps template.

Best regards,
Mikkel

 

You must be logged in to post in the forum