Per Erik Strandberg /cv /kurser /blog

In this tutorial we will learn how to add elements to our plone pages, making something like this appear in your site:

There are a number of things we will not learn about viewlets - but we will get somewhere to start.

Files needed

Only need three files are needed to do this:

The only contains a comment. This can be considered good practice since it is otherwise easy for a user to remove blank files.


This is a typical Plone page template (as seen in for example: Plone Archetypes View Template Modifications) and contains nothing fancy:

  This page is <b tal:content="request/URL">URL</b>

As you can see we print the url of the present file and then a link to the Plone Cms page in my blog.


The configure.zcml file contains the real action. It hooks zope and the page template together.

First let's see the important contents and then we will slowly walk through:

<configure ... >



As we can see we define a browser:viewlet (so we need the browser namespace). These are the following attributes:


Things we might want to be able to control that are not covered in this tutorial include:

See also: Plone Cms
This page belongs in Kategori Programmering