collective.geo.* 是一組提供 GIS 服務的 Plone 模組,它的地圖顯示區塊,預設是在 description 欄位下方,也就是在 <div id="viewlet-above-content-body"> 的下方,想要把它移到 <div id="viewlet-below-content"> 旁邊。 首先,用 firebug 得知顯示區塊被包在 <div id="kml-content-viewlet"> 裡,那麼它是由哪個檔案提供的呢?
$ grep -r kml-content-viewlet buildout-cache/eggs
collective/geo/kml/browser/kmlcontentviewlet.pt 檔案有我們要找的 div,照慣例,先到 collective/geo/kml/browser/configure.zcml 找線索:
<browser:viewlet
name="collective.geo.kml.kmlcontentviewlet"
for="collective.geo.geographer.interfaces.IGeoreferenceable"
class=".viewlets.ContentViewlet"
manager="plone.app.layout.viewlets.interfaces.IAboveContentBody"
template="kmlcontentviewlet.pt"
layer="..interfaces.IGeoKmlLayer"
permission="zope2.View"
/>
看來把 viewlet 的 manager 由 IAboveContentBody 改到 IBelowContent 就行。
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.