Home arrow Zope arrow Plone Content Types With Archetypes

Plone Content Types With Archetypes

Plone is an excellent content management system. You will probably find everything you need in the system itself, or from third party content types. If you don't, however, it is very easy to create your own content types, as this article will explain.

TABLE OF CONTENTS:
  1. Plone Content Types With Archetypes
  2. A Quotation Content Type
  3. Mutators and Accessors
  4. Validators
By: Peyton McCullough
Rating: starstarstarstarstar / 16
February 28, 2006

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

Plone is a fantastic content management system. Out of the box, it contains a number of useful features, and managing content is stunningly easy. A number of third-party utilities also exist that can be used to expand the capabilities of a Plone site.

However, each website has its own unique needs. While there's a good chance that one of Plone's many third-party content types will meet your needs, there's also a chance that you won't be able to find exactly what you want. In this case, you are forced to create your own content types. This sounds like quite a task, but, thankfully, it really isn't. Creating content types in Plone can actually be extremely easy, and the tool that makes it all possible is Archetypes.

In this article, we'll take a look at using Archetypes to create a content type for Plone. As I said, this can be done very easily, and only minimal knowledge of Python is needed to create something simple.

Archetypes Overview

The way Archetypes works is incredibly simple, which enables you as a developer to easily add new content types made for specific purposes. Say you wanted to build a collection of quotations which interest you. Now, you could just shove them into separate files and format them as best you could. However, this would be very hard to maintain, especially if you wanted to make a universal change to things.

This is where Archetypes comes in. The quotation pages can be broken down into basic fields. Here, there would be a field for the speaker of the quotation and a field for the quotation itself. Both would be represented as basic text. To implement these fields in Archetypes, you would create something called a schema defining the two fields. The schema would then be shoved into a Python script with a few more instructions. Next, you'd create a few more files with more information on the content type as well as instructions telling Plone how to install it. Finally, you'd simply install your new content type. Archetypes would generate the look of the page as well as a management interface based on the data in the Python script. That's all there is to something as simple as this example. As you can tell, Archetypes is an extremely powerful tool that can handle a lot of work for you.



 
 
>>> More Zope Articles          >>> More By Peyton McCullough
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

ZOPE ARTICLES

- Creating Zope Products
- Plone Content Types With Archetypes
- Flat User Management in Zope
- Creating Basic Zope Applications
- Getting started with Zope for Linux and Sola...
- ZPT Basics (part 4)
- ZPT Basics (part 3)
- ZPT Basics (part 2)
- ZPT Basics (part 1)
- Exception Handling In DTML
- DTML Basics (part 4)
- DTML Basics (part 3)
- DTML Basics (part 2)
- DTML Basics (part 1)
- Using Zope With Apache

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: