Creating HTML-based elements  Adding new content types

Chapter 4: Building Portlets

Creating document elements

The document element allows you to load an application document (Microsoft Word, Microsoft Excel, PDF, and so on) into a portlet.

When you create document elements:

StepsCreating a document element

  1. Select Document Element. You see the Document Element Definition window.

  2. In the Document to Upload field, enter the full path to the document you want to upload, or click Browse to search for and select the document.

  3. In the Destination Location field, accept the default folder name or append the default name with an additional folder name. Enter only the folder name; that is, do not enter the complete path. This is the location to which the document is uploaded.

    NoteThe default upload folder name is configurable in global.properties.xml. See Appendix A, “Configuring Global Properties.”Also, the parent location of the document root folder must have “write” permissions.

    Web Studio creates a document root level directory on the drive of your EP installation and uses the current user’s login name as the default folder. For example, if the default for the Destination Location displays “Smith”, and the EP installation drive is D:, the uploaded document is saved to D:\tmp\PortalDocs\Smith\.

    To create a different folder using this structure, enter another file name after the name that displays in the Destination Location field. For example, if the field displays “Smith” and you enter “\Smith,” the file is uploaded to D:\tmp\PortalDocs\Smith\Smith.

  4. Click Upload. When a message displays confirming that the upload was successful, click OK.

    Note The length of time before the confirmation message displays depends on the document’s size.

  5. Document Name – displays the document’s name.

  6. Content Type – from the drop-down list, select the type of content the document contains.

    If you do not see the content type you want, select Add New from the drop-down list to add a new content type.

  7. New Content Type – displays only when you select Add New from the Content Type drop-down list. Enter the new type in this format:

    [application | image | text]/plug-in name

    NoteWhether the new type works depends on whether there is an application and the plug-in installed for the content type specified. See “Adding new content types” on page 57.

  8. Click Next.

  9. Enter a name for the element and click Finish. You return to the Portlet Builder.

NoteRegardless of the element type, the procedure to save the element and portlet is the same. See“Saving portlets”.





Copyright © 2004. Sybase Inc. All rights reserved. Adding new content types

View this book as PDF