Index: quintagroup.portlet.map/trunk/quintagroup/portlet/map/configure.zcml
===================================================================
--- quintagroup.portlet.map/trunk/quintagroup/portlet/map/configure.zcml	(revision 2188)
+++ quintagroup.portlet.map/trunk/quintagroup/portlet/map/configure.zcml	(revision 2193)
@@ -2,4 +2,5 @@
     xmlns="http://namespaces.zope.org/zope"
     xmlns:five="http://namespaces.zope.org/five"
+    xmlns:browser="http://namespaces.zope.org/browser"
     xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
     xmlns:plone="http://namespaces.plone.org/plone"
@@ -34,3 +35,23 @@
          />
 
+    <!-- overrides IMapEnabledView -->
+    <browser:page
+        for="Products.ATContentTypes.interface.IATTopic"
+        name="maps_googlemaps_enabled_view"
+        class=".map_fix.FolderMapView"
+        permission="zope.Public"
+        layer=".interfaces.IQGMapPortletLayer"
+        allowed_interface="Products.Maps.interfaces.map.IMapEnabledView"
+        />
+
+    <browser:page
+        for="Products.ATContentTypes.interface.IATFolder"
+        name="maps_googlemaps_enabled_view"
+        class=".map_fix.FolderMapView"
+        permission="zope.Public"
+        layer=".interfaces.IQGMapPortletLayer"
+        allowed_interface="Products.Maps.interfaces.map.IMapEnabledView"
+        />
+
+
 </configure>
Index: quintagroup.portlet.map/trunk/quintagroup/portlet/map/overrides.zcml
===================================================================
--- quintagroup.portlet.map/trunk/quintagroup/portlet/map/overrides.zcml	(revision 2188)
+++ 	(revision )
@@ -1,25 +1,0 @@
-<configure
-    xmlns="http://namespaces.zope.org/zope"
-    xmlns:browser="http://namespaces.zope.org/browser"
-    i18n_domain="quintagroup.portlet.map">
-
-    <!-- overrides IMapEnabledView -->
-    <browser:page
-        for="Products.ATContentTypes.interface.IATTopic"
-        name="maps_googlemaps_enabled_view"
-        class=".map_fix.FolderMapView"
-        permission="zope.Public"
-        layer=".interfaces.IQGMapPortletLayer"
-        allowed_interface="Products.Maps.interfaces.map.IMapEnabledView"
-        />
-
-    <browser:page
-        for="Products.ATContentTypes.interface.IATFolder"
-        name="maps_googlemaps_enabled_view"
-        class=".map_fix.FolderMapView"
-        permission="zope.Public"
-        layer=".interfaces.IQGMapPortletLayer"
-        allowed_interface="Products.Maps.interfaces.map.IMapEnabledView"
-        />
-
-</configure>
Index: quintagroup.portlet.map/trunk/quintagroup/portlet/map/qgmapportlet.pt
===================================================================
--- quintagroup.portlet.map/trunk/quintagroup/portlet/map/qgmapportlet.pt	(revision 2188)
+++ quintagroup.portlet.map/trunk/quintagroup/portlet/map/qgmapportlet.pt	(revision 2193)
@@ -1,10 +1,7 @@
 <metal:block use-macro="here/global_defines/macros/defines" />
-<tal:portlet
-    define="view context/@@maps_googlemaps_view;
-            enabled context/@@maps_googlemaps_enabled_view/enabled"
-    condition="python:isViewTemplate and enabled and [m for m in view.getMarkers()]"
-    on-error="nothing">
+<tal:portlet>
 
-  <dl class="portlet portletMapsPortlet">
+  <dl class="portlet portletMapsPortlet"
+      tal:define="view view/gmapview;">
 
       <dt class="portletHeader">
@@ -31,5 +28,5 @@
           <span>
             <a href="#"
-               tal:attributes="href string:${here/absolute_url}/maps_map"
+               tal:attributes="href string:${view/collection/absolute_url}/maps_map"
                i18n:domain="quintagroup.portlet.map" i18n:translate="label_full_map">Full Map</a></span>
           <span class="portletBottomRight"></span>
Index: quintagroup.portlet.map/trunk/quintagroup/portlet/map/qgmapportlet.py
===================================================================
--- quintagroup.portlet.map/trunk/quintagroup/portlet/map/qgmapportlet.py	(revision 2188)
+++ quintagroup.portlet.map/trunk/quintagroup/portlet/map/qgmapportlet.py	(revision 2193)
@@ -1,13 +1,23 @@
 from zope.interface import implements
+from zope.component import queryMultiAdapter, getMultiAdapter
 
+from plone.memoize import ram
+from plone.memoize.instance import memoize
+from plone.memoize.compress import xhtml_compress
+
+from plone.app.portlets.portlets import base
+from plone.app.portlets.cache import render_cachekey
 from plone.portlets.interfaces import IPortletDataProvider
-from plone.app.portlets.portlets import base
 
 from zope import schema
 from zope.formlib import form
+
+from Acquisition import aq_inner
 from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
 
 from quintagroup.portlet.map import QGMapPortletMessageFactory as _
 
+from logging import getLogger
+logger = getLogger("Plone")
 
 class IQGMapPortlet(IPortletDataProvider):
@@ -24,7 +34,7 @@
     # below.
 
-    # some_field = schema.TextLine(title=_(u"Some field"),
-    #                              description=_(u"A field to use"),
-    #                              required=True)
+    collection_path = schema.TextLine(title=_(u"Path to collection"),
+        description=_(u"A plone physical path to collection of locations"),
+        required=True)
 
 
@@ -40,12 +50,6 @@
     # TODO: Set default values for the configurable parameters here
 
-    # some_field = u""
-
-    # TODO: Add keyword parameters for configurable parameters here
-    # def __init__(self, some_field=u""):
-    #    self.some_field = some_field
-
-    def __init__(self):
-        pass
+    def __init__(self, collection_path=""):
+       self.collection_path = str(collection_path)
 
     @property
@@ -65,40 +69,46 @@
     """
 
-    render = ViewPageTemplateFile('qgmapportlet.pt')
+    _template = ViewPageTemplateFile('qgmapportlet.pt')
+
+    def __init__(self, *args):
+        base.Renderer.__init__(self, *args)
+        context = aq_inner(self.context)
+        portal_state = getMultiAdapter((context, self.request), name=u'plone_portal_state')
+        self.portal = portal_state.portal()
+        self.gmapview = queryMultiAdapter((self.collection, self.request),
+                                          name='maps_googlemaps_enabled_view')
+        #self._data = self.collection
+
+    #@ram.cache(render_cachekey)
+    def render(self):
+        return xhtml_compress(self._template())
+
+    @property
+    def available(self):
+        return bool(self.gmapview and \
+                    self.gmapview.enabled and \
+                    self.gmapview.getMarkers())
+
+    @property
+    def collection(self):
+        try:
+            return self.portal.restrictedTraverse(self.data.collection_path)
+        except:
+            return None
 
 
 class AddForm(base.AddForm):
-    """Portlet add form.
-
-    This is registered in configure.zcml. The form_fields variable tells
-    zope.formlib which fields to display. The create() method actually
-    constructs the assignment that is being added.
-    """
     form_fields = form.Fields(IQGMapPortlet)
+    label = _(u"Add Quintagroup Map Portlet")
+    description = _(u"This portlet displays Locations from the collection on the Google Map.")
 
     def create(self, data):
-        return Assignment(**data)
-
-
-# NOTE: If this portlet does not have any configurable parameters, you
-# can use the next AddForm implementation instead of the previous.
-
-# class AddForm(base.NullAddForm):
-#     """Portlet add form.
-#     """
-#     def create(self):
-#         return Assignment()
-
-
-# NOTE: If this portlet does not have any configurable parameters, you
-# can remove the EditForm class definition and delete the editview
-# attribute from the <plone:portlet /> registration in configure.zcml
-
+        portal_state = getMultiAdapter((self.context, self.request),
+                                       name=u'plone_portal_state')
+        default_path = '/'.join(portal_state.portal().getPhysicalPath()) + '/events'
+        return Assignment(collection_path=data.get('collection_path', default_path))
 
 class EditForm(base.EditForm):
-    """Portlet edit form.
-
-    This is registered with configure.zcml. The form_fields variable tells
-    zope.formlib which fields to display.
-    """
     form_fields = form.Fields(IQGMapPortlet)
+    label = _(u"Edit Quintagroup Map Portlet")
+    description = _(u"This portlet displays Locations from the collection on the Google Map.")
