Posts Tagged ‘plone’

Plone, WordPress discussion

One week ago I migrated my personal site/blog from Plone to WordPress. As such I’ve decided to write a small comparison of the 2 systems.

Let’s pun things in my context. A few years ago I’ve worked on a custom CMS implementation. The goal was to develop a product targeted for accesibility and simplicity of use. And, as it was the golden age it was decided to implement it from scratch using java. If you are wondering, the project is still used today but it was not possible to evolve as fast as the opensource projects and it lacks most of the sparkling features of today CMS systems.

(more…)

Plone to WordPress migration

The task ahead was to migrate my old plone based blog/site to a wordpress site. Here was a short list of items to keep in mind:

  • plone import content (normal content ~ 600 entries, special:ContentPanels)
  • keep old links still valid including RSS !?
  • handle relative links in posts
  • handle google (sitemap, adwords, analytics)
  • design (find theme, modify css, logo/photo, php part)
  • others (the photos, favicon, 404 page, pre style for code snippets)

(more…)

Create links with a script

This shows a very simple example on how to create content dynamicaly.

The problem: automatically populate a folder with a list of links
The solution:

1. create a script object in that folder (using the zope interface)
2. edit this script to create the links using data from a source (in my case I just wrote an external script which generated the array but in your case you might read the list from different other sources

# Simple script to programatically create a list of links
# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
RESPONSE =  request.RESPONSE

#replace this with your own way to get your data
links = [
['http://len.is-a-geek.org/photo/icebike', 'Azuga ice', 'Azuga, Baiului mountains, ian 2005 cipcam'],
['http://len.is-a-geek.org/photo/baiului30oct', 'Baiului 1600m', 'Baiului mountains, oct 2004 cipcam'],
['http://len.is-a-geek.org/photo/iezer_mtb', 'iezer mtb', 'short biking trip in iezer, cipcam'],
['http://len.is-a-geek.org/photo/on_mogosoaia_ice', 'mogosoaia - frozen lake', 'mogosoaia, frozen lake ian 2004'],
['http://len.is-a-geek.org/photo/zapada', 'winter', 'biking in the snow']
]

for l in links:
   lid = l[1].replace(' ','-')
   container.invokeFactory('Link', id=lid)
   container[lid].edit(remote_url=l[0], title=l[1], description=l[2])

return "Created list"

3. Execute the script using the “test” tab.

References:

  • how-to on plone.org
  • read the source of CMFPlone/tests/testContentTypes.py
Related Posts with Thumbnails