Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Google maps key - what about domain aliases? View modes: 
User avatar
Member
Member
tripletdad99 - 7/29/2009 10:31:41 AM
   
Google maps key - what about domain aliases?
I've noticed a problem with the Google maps web part. What if you have Domain aliases setup?

For example, let's say I am currently working on an Intranet site found at http://cmstest.company.corp/ - with a domain alias of http://cmstest (shorter version). If I put in the Google maps key setting for the normal / full domain ("cmstest.company.corp") and the intranet user comes to the site using the full URL (as noted above) - then the Google map show up as expected. If, however, the user uses the shortcut (domain alias - "cmstest" in this case), the Google map does NOT show up, because the key is not for that domain alias... but rather the full domain.

Kentico obviously allows for domain aliases, so how can we accommodate this with the Google maps key setting?

User avatar
Member
Member
tripletdad99 - 7/29/2009 12:07:24 PM
   
RE:Google maps key - what about domain aliases?
OK... with a little playing around with Macros, I came up with this. It feels like a hack, but seems to be working:

{%if (domain == "cmstest") { "Domain_Alias_Google_Map_Key_Goes_Here" } else { "Full_Domain_Google_Key_Goes_Here" }%}


User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 7/29/2009 2:59:06 PM
   
RE:Google maps key - what about domain aliases?
We thank Mark for his solution. Hope it will be helpful for others, too.

Best regards,
Helena Grulichova

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 8/4/2009 5:49:30 AM
   
RE:Google maps key - what about domain aliases?
Hi all,

there is one more possibility how to insert Google maps keys. Please see here: http://devnet.kentico.com/FAQs/Web-parts---Controls/How-to-use-multiple-Google-maps-keys-in-Google-map.aspx#FAQ168

Best regards,
Helena Grulichova