Podius

Content Management System

Introduction

Presentation

Good introduction to Podius: a talk Content Management with Podius for Open Source Developers' Conference 2006 and Israel Perl Workshop 2007.

Introduction to components

The components are objects in podius-based projects, containing the actual data, Components have relations one with another, two most important relations are inclusion of other components (father component includes child components) and reference to other components. The first kind of relation composes component hierarchies (trees), the second does not; from other view points these two component relations are similar.

Here is a component tree with one Edition as the father of other components:

  Edition "Porto-Rino Today"
    |
    |--- Section "Politics"
    |
    |--- Section "Sport"
    |      |
    |      |--- Article "Local chess tournament"
    |      |
    |      |--- Article "Football results"
    |      |
    |      `--- Article "Mass jogging"
    |
    `--- Section "Weather"

Every component consists of properties. Most of the properties are textual, some of them are dates, lists, selections and relations to other components (so called component collections).

Here is an example component of type Article and its properties:

Component type: Article, component id: 6004
Property nameProperty typeValue
date_createdTime2000-07-18 15:01:00
last_publishedTime2000-07-19 07:01:00
nameScalar"Football results"
authorScalar"Andre Gedas"
is_activeBooleanTrue
bodyText"Very long body ..."
containerVComponentSection "Sport"
keywordsScalarList"football", "goool"
related_articlesVComponentCollectionArticle "Hockey", ...

Introduction to templates

Every component (edition, section, article in our example) can have one or more representations on the web, so called published pages. Template is a source of a publishable page. So every component can have one or more templates. We will also call this component a starting component of this template.

Templates are usually stored in files. Template is a regular html or text with embedded directives in form:

  <{ directive content }>

Here is a simple template example for component of type Edition (which after processing becomes the main index.html):

  <html>
  <head><title>Edition <{name}></title></head>
  <body bgcolor="white">

  <h1 class="centered"><{name}></h1>

  Sections: <ul>
  <{sections get_all ({
    <li><a href="<{&link}>"><{name}></a>
  })}>
  </ul>

  <hr>
  <p>Processed on <{&format_date}>.
  </body>
  </html>

This creates a title and a list of all sections in the edition with links to the section pages, those URI may look like sections/5002.html. Then the current processing date is printed (19/Jul/2000 07:01:00).