Any way to have the Agenda block offer a "Map" link without the site visitor having to take the intermediary step of viewing in Google calendar?

Comments

aidanlis’s picture

Status: Active » Postponed

I'm sure there is, but I don't have time to implement this.

kriscarp’s picture

You should really get together with the developer of the gcal events module and integrate the two. Both are great modules, but I'm needing functions of each into one spectacular module! Specifically, with gcal events you can make the location a link to the map. But, with Agenda events are grouped by date and colored for each calendar. Love them both, wish they were one!

granttoth’s picture

Can't Remove.

granttoth’s picture

I got this working by adding one line to the template file. Works great!

I added this just before the last </ul> in my block template.
<p><a title="See on Map" target="_blank" href="http://maps.google.com/maps?q=<?php echo $event['where']; ?>">See on map</a></p>

granttoth’s picture

With some help from the fellas over at Stackoverflow I was able get this to only print when the $event['where'] has data.
Sometimes they don't always fill out the Google Calendar correctly and It was a bit silly to link nothing relevant.

<?php
if (!empty($event['where'])) {
  echo "<a title='See on Map' target='_blank' href='http://maps.google.com/maps?q="; echo $event['where']; echo "'>See on map</a>";
} 
?>