CGGooglemaps with CGCalendar

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
ittsmee2
Forum Members
Forum Members
Posts: 23
Joined: Sat Nov 19, 2005 12:42 am

CGGooglemaps with CGCalendar

Post by ittsmee2 »

I would love to use the CGGooglemaps in conjunction with CGCalendar to produce a google map for each event.  I would like to pull the address from a custom field called city-state.  I have tried numerous ways to do this but cannot get it to work.

Here is what I am trying to do in the CGCalendar event template:

Code: Select all

{assign var='address' value=$entry-city-state}
{assign var='summary' value=$event.event_summary}
{cggm_add_dynpoint map='1' name='schedule' address='$address' description='$summary'}

{CGGoogleMaps map='1'}
Any help would be appreciated.
Mantlet
Forum Members
Forum Members
Posts: 114
Joined: Fri Apr 28, 2006 9:42 am
Location: Haarlem - Netherlands

Re: CGGooglemaps with CGCalendar

Post by Mantlet »

I have managed to get this to work. I tried using assign as well, but because it didn't work I sorted it with capture:

Code: Select all

{capture name="adres" assign="adres"}{$entry->address}, {$entry->customfieldsbyname.Plaats}{/capture}

{cggm_add_dynpoint map="bedrijven" name=$entry->company_name address=$adres description=$adres}

{CGGoogleMaps map="bedrijven"}
This is not with Calendar, but with Company Directory. The idea should be the same. I had the capture within the {foreach} because there could be multiple entries on one page. The map was outside of it.

Hope it helps
Post Reply

Return to “Modules/Add-Ons”