Scripts posted recently tagged to plone in Kelpi

1- 3 of 3.

Set the selected attribute on a select box

to zope plone tal xml by nando.quintana

<option value="this_value" tal:attributes="selected python:test(my_value=='this_value','selected',)">this value</option>

Plone portlet example

to plone zpt portlet by mikel

<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      i18n:domain="ataria">
<body>
<div metal:define-macro="portlet">

Indexar objetos plone de forma geográfica

to geo index plone plone3 python by nando.quintana

# http://zcologia.com/news/595/plone-r-tree-spatial-index/
from Products.SpatialIndex.interfaces import ISpatialIndex
from Products.PleiadesGeocoder.interfaces import IGeoItemSimple
parks = app['plone']['parks']
index = ISpatialIndex(parks)
hits counter