KebasData and Plonei've had this idea in my head since forever. it's now time to put ideas to actions. It seems only natural to use KebasData as plone slots, so that stuff from somewhere else can be used as though it's part of the plone site. i'll expand on the current howto. It's easy enough, methinks.but before that, i've redone the test page for KebasData that grabs userfriendly and zope news. i haven't yet done the google example. The page is here. Let's try and turn our Zope News to a slot for our plone site. Note: These assumes that all these objects are at portal_skins/custom
title: url: http://www.zope.org/ pattern: <a href="(.*?)">(.*?)</a> start pattern: newsitem_icon.gif end pattern: div class="box" render method: sc_zn proxy: refresh: 7200 request method: *GET POST Then, we create the render method. In this example, we'll be using a Script (Python) as the render method. ###id sc_zn ###parameter list: q, b for k,v in context.match: print '<a href="%s">%s</a><br />' % (k,v) return printed We now copy any of the plone slots:
#id: zn_slot
<span metal:define-macro="znBox"
class="box"
summary="Links" cellpadding="0" cellspacing="0"
i18n:domain="plone"
>
<div class="box">
<h5 i18n:translate="links_title">Links</h5>
<div class="body">
<div class="content">
<x tal:replace="structure here/zn" />
</div>
</div>
</div>
</span>
Now, we go to Plone > Properties, and put in the slots. for eg, we'll put this for the left slot: here/zn_slot/macros/znBox That's it. we now have Zope News slot for our plone page. Now, the challenge is what happens if zope.org is unreachable? i think putting in a try/except in the sc_zn would help. We'll see :) This example is now part of my-zope.org (see the left slot). if nothing goes wrong, it'll be a permanent feature to my-zope.org I hope to put up a repository for all usable KebasData recipes that can be used as plone slot. got one? mail me the kebasdata instance pattern/url, the render method and the slots source and i'll put it up. I'll start with the zope news.
|
This site conforms to the following standards:
When I set up a KebasData instance following your Zope News example, I get this error message when I try to initialize:
-----
Kebas Data not initialized. Message returned by target server: Moved Temporarily (2003-12-15 09:12)
-----
I've tried both http://www.zope.org and http://zope.org, but each time I get the same result.