Lesson 7. Elvis Photo Archive

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.

The King had many faces. We can offer our site visitors a peek at the many sides of Elvis with a photo archive.

  1. Click the photos document.

  2. Click the View tab to view it.

This page shows the photos in the archive one after another. It's not very fancy.

Let's improve it to organize the photos by title and size. The improved photo archive will list the photos by title and includes a link each picture.

  1. Click the photos document to edit it.

  2. Change the document contents to::

    <dtml-var standard_html_header>
    
    <h2><dtml-var title></h2>
    
    <dtml-in expr="photoArchive.objectValues()">
    <p>
      <a href="<dtml-var absolute_url>"><dtml-var title></a>
      (<dtml-var getSize> bytes)
    </p>
    </dtml-in>
    
    <dtml-var standard_html_footer>
  3. Click the Change button.

  4. Click the View tab.

Notice how the photo list now shows a link to each photo along with its size.

Summary

Images can display themselves and can also provide useful information such as size, title, and URL.

In the next lesson you'll learn how to create pictures with DTML scripting.


Comments on this lesson? Email feedback.