This HOWTO covers how to add files and images to the website. Due to some recent changes this is overall very easy now. If you can edit a document you can add a file or image to it. As an added benefit the document will carry that file/image around with it as it moves. This means if you need to move the document to another area of the site no links to the images in it need to be updated if these instructions are followed.

  1. If you are starting a new item add a CompoundDoc with a profile of Worldforge_Document. Then skip step 1
  2. Change the profile to a Worldforge_Document. You can do this by selecting Worldforge_Document and hitting the Change Profile button.
  3. Go to the top of the page and add a File or Picture.
    The name pretty much needs to be alphanumeric but underscores are allowed also. It won't let you call it something.jpg but something_jpg is okay. Don't worry about the extension on the file since zope will notify the browser of the right type automatically.
  4. Add a file or image to the File or Picture object. They will be at the bottom of the edit page as shown here.
  5. In the main textarea where you want the image or file to be just put a <dtml-var name> If you called your picture picture1 when you created it this would be <dtml-var picture1> . You can view this pages source code by going to edit it to see how it was done here. This step will take care of setting the right image size, content type, caching directives etc. The main difference between a file and an image is that a file will have a link to it and an image will have the actual image there.
  6. Now you are done. Just view the page and change where you want the picture as necessary. If there are any features or changes you would like made to this process please tell me or post on the infra bulletin board and I will see what can be done.