Lesson 5. Recent Elvis Sightings

Zope cannot find the tutorial examples. You should install the tutorial examples before continuing. Choose "Zope Tutorial" from the product add list in the Zope management screen to install the examples.

If you have already installed the tutorial, you can either follow along manually, or reinstall the tutorial examples. Note: make sure that you have cookies turned on in your browser.

Elvis sightings happen all the time. You'd like to record them and list them on your web site. Let's look at a simple system for organizing sightings and displaying them on your web site.
  1. Click the sightings.html web page.
  2. Click the Test tab to view it.

Notice how the page lists a number of Elvis sightings. Also notice that these sightings weren't specifically listed in the contents of the web page. Where did they come from?

  1. Click the sightingsFolder folder to enter it.
  2. Click on the sighting2 file to examine it.
  3. Go back the sightingsFolder folder by clicking the sightingsFolder location link.
  4. Select the sighting2 file by clicking its check box.
  5. Click the Delete button.

You just deleted a Zope object that describes an Elvis sighting. Let's see how this affects the sightings web page.

  1. Click the sightings.html web page.
  2. Click the Test tab to view it.

The Shelbyville sighting is not longer listed. So the list of sightings is somehow built from the files in the sightingsFolder folder.

What if you want the Shelbyville sighting back? Since you deleted it, you can't just paste it back. You need to Undo your action.

  1. Click the Undo tab.
  2. Select the first transaction (ending with "manage_delObjects") by clicking its check box.
  3. Click the Undo button.
  4. Click the sightingsFolder folder to enter it.

Sure enough the sighting2 sighting has returned.

Summary

Multiple Zope objects can be combined to form complex web pages.

In the next lesson you'll learn about looping over lists of Zope objects.