You are not logged in Log in Join
You are here: Home » Download Zope Products » Content Management Framework » CMF Documentation » CMF Requirements Documents » CMF Use Cases » Use Case: Create New Content Via FTP - » View Document

Log in
Name

Password

 

Use Case: Create New Content Via FTP -

Actor: Content Creator

The most straightforward way to create content in the CMF is through the CMF's web interface. Authors that create significant volumes of content may be interested in client side applications that aid in the editing burden. This document addresses creating content using Emacs' FTP integration. It is possible to create content using other client applications that support FTP or via WebDAV.

Of the default content that comes with the CMF, Documents and News Items may be created via FTP. When creating content via FTP, the CMF determines the type of content to create based on the file's extension. The mapping between extension and content type is determined by the content type registry tool.

To create a new Document in the CMF from within Emacs, open a new file by typing "C-x C-f" and then entering an FTP path. For example, the path:

  /[email protected] 8021:/Members/someuser/NewDocument.txt

will create a new "Document" because of its extension ".txt". It will be created in the folder "/Members/someuser" on the machine "www.somemachine.com" by logging in as "someuser" on the FTP port 8021. To achieve the space between the machine name and the port, you type "C-q (space)". Emacs will request a password before the file is created and the buffer is opened. Note that the ftp port used is determined by Zope's startup script or via command line arguments.

A new empty buffer then opens in Emacs where you can begin entering the body of the Document. A Document expects its body to be entered in Structured Text format. For example:

    Heading One

        This is a paragraph.  Sometimes we enter *special markers* to
        achieve text effects in structured text.

To save the document type "C-x C-s". When saved, Emacs does an FTP PUT to move the document to the CMF. The CMF then processes the file and extracts the body and places it into the new Document.

Using FTP it is also possible to edit metadata and attributes other than "body." To accomplish this it is necessary to refetch the document from the CMF. Close the buffer that represents your new content object by typing "C-x k". Then open the content object via FTP again by typing "C-x C-f" and entering the same path.

This will open a buffer with your newly created Document with its metadata represented in "header" format. For example:

    Title:
    Subject: 
    Publisher: No publisher
    Description: 
    Contributors: 
    Effective_date: None
    Expiration_date: None
    Type: Document
    Format: text/plain
    Language: 
    Rights: 
    SafetyBelt: 1003170859.24

    Heading One

        This is a paragraph.  Sometimes we enter *special markers* to
        achieve text effects in structured text.

Now edit the metadata by entering values for attributes after the colons taking care to leave a single space between the colon and the value. Attributes that require multiple lines can be entered by including the first line after the colon and subsequent lines between the first line and the next metadatum header. Note that the SafetyBelt header should not be altered as it represents an internal identifier which protects against editing conflicts. Save your changes with "C-x C-s".