<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>Customizing Item Information Pages and Data Entry Forms</TITLE
><META
NAME="GENERATOR"
CONTENT="aD Hack of: Modular DocBook HTML Stylesheet Version 1.60"><LINK
REL="HOME"
TITLE="Content Management System"
HREF="index.html"><LINK
REL="UP"
TITLE="Developer's guide"
HREF="dev-guide.html"><LINK
REL="PREVIOUS"
TITLE="Developer's guide"
HREF="dev-guide.html"><LINK
REL="NEXT"
TITLE="Using Permissions"
HREF="dev-permissions.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="ad-doc.css"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Content Management System</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="dev-guide.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 3. Developer's guide</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="dev-permissions.html"
>Next</A
></TD
></TR
></TABLE
><HR
SIZE="1"
NOSHADE="NOSHADE"
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="custom-interface"
>3.2. Customizing Item Information Pages and Data Entry Forms</A
></H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>3.2.1. <A
HREF="custom-interface.html#custom-interface-forms"
>Forms</A
></DT
><DT
>3.2.2. <A
HREF="custom-interface.html#custom-interface-information-components"
>Information Components</A
></DT
></DL
></DIV
><P
>Once you have the defined a content type for your system, you
    can use the generic interface defined by the content management
    system for creating, editing and browsing items of that type. If
    the generic interface does not meet your requirements, you can
    customize part or all it to suit your needs.</P
><P
>The generic interface for content items includes three general
    types of templates, all located under
    <TT
CLASS="computeroutput"
>/cms/modules/items</TT
>:</P
><UL
><LI
><P
CLASS="listitem"
><B
CLASS="phrase"
>Forms</B
> for all item-related transactions.</P
></LI
><LI
><P
CLASS="listitem"
><B
CLASS="phrase"
>Information pages</B
> for displaying information about the
	items. The page templates themselves may display little or no
	information directly, instead relying on included components.</P
></LI
><LI
><P
CLASS="listitem"
><B
CLASS="phrase"
>Information components</B
> for providing access to specific
	types information (and associated actions) in the information page.
	Components are designed for inclusion in a page (either the generic
	information page or a custom one), not for standalone display.</P
></LI
></UL
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="custom-interface-forms"
>3.2.1. Forms</A
></H2
><P
>The following generic data entry forms are generated by the
      system for any content type:</P
><DIV
CLASS="informaltable"
><A
NAME="AEN1563"
></A
><TABLE
BORDER="1"
CLASS="CALSTABLE"
CELLPADDING="10"
><THEAD
><TR
><TH
ALIGN="CENTER"
VALIGN="MIDDLE"
>Page</TH
><TH
ALIGN="CENTER"
VALIGN="MIDDLE"
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
><TT
CLASS="computeroutput"
>create-1</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Form to enter attributes for a new content item. The widgets
	      displayed on the generic form are determined by the form metadata
	      the developer has associated with attributes of the content type.
	      Includes a radio selection allowing the user to pick a method for
	      adding the body of the content item. 

	      <DIV
CLASS="variablelist"
><DL
><DT
CLASS="listitem"
>Signature:</DT
><DD
><P
CLASS="listitem"
>&#13;		      <TT
CLASS="computeroutput"
>parent_id</TT
>: item ID of container item
		    </P
><P
CLASS="listitem"
>&#13;		      <TT
CLASS="computeroutput"
>content_type</TT
>: content type of new item
		    </P
></DD
></DL
></DIV
>

	    </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>content-add-1</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Form to upload or enter the body of a content item. Displays
	      either a file upload widget or text area depending on user
	      selection 

	      <DIV
CLASS="variablelist"
><DL
><DT
CLASS="listitem"
>Signature:</DT
><DD
><P
CLASS="listitem"
>&#13;		      <TT
CLASS="computeroutput"
>parent_id</TT
>: item ID of container item
		    </P
><P
CLASS="listitem"
>&#13;		      <TT
CLASS="computeroutput"
>content_type</TT
>: content type of new item
		    </P
><P
CLASS="listitem"
>all other attributes from previous step (varies by content type)</P
></DD
></DL
></DIV
>

	    </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>revision-add-1</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Form to edit attributes of an existing content item. The
	      widgets displayed on the generic form are determined by the form
	      metadata the developer has associated with attributes of the
	      content type. Includes a radio selection allowing the user to pick
	      a method for editing the body of the content item. 

	      <DIV
CLASS="variablelist"
><DL
><DT
CLASS="listitem"
>Signature:</DT
><DD
><P
CLASS="listitem"
>&#13;		      <TT
CLASS="computeroutput"
>item_id</TT
>: ID of the item
		    </P
></DD
></DL
></DIV
>

	    </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>attributes-edit</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Form to edit the attributes of an existing content item. Copies
	      the content from the latest revision to the new revision. 

	      <DIV
CLASS="variablelist"
><DL
><DT
CLASS="listitem"
>Signature:</DT
><DD
><P
CLASS="listitem"
>&#13;		      <TT
CLASS="computeroutput"
>item_id</TT
>: ID of the item
		    </P
></DD
></DL
></DIV
>

	    </TD
></TR
></TBODY
></TABLE
></DIV
><P
>If a custom form is required, you may define it in
      <TT
CLASS="computeroutput"
>/cms/modules/items/custom/&#60;content_type&#62;/</TT
>
      with the same name as specified above. If a custom implementation of the
      form exists, the system will redirect to it. Once the user has been
      redirected to your custom form, you may choose to implement any
      page flow desired before ultimately redirecting to the item
      information page.</P
><P
>See also the documentation on <A
HREF="setup-administration.html#data-entry-methods"
>auto-generated</A
> forms.</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="custom-interface-information-components"
>3.2.2. Information Components</A
></H2
><DIV
CLASS="informaltable"
><A
NAME="AEN1621"
></A
><TABLE
BORDER="1"
CLASS="CALSTABLE"
CELLPADDING="10"
><THEAD
><TR
><TH
ALIGN="CENTER"
VALIGN="MIDDLE"
>Component</TH
><TH
ALIGN="CENTER"
VALIGN="MIDDLE"
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>children</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>List of links to child items of the current item. Includes a
	      select widget to add a new child item of an appropriate type.</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>templates</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Lists templates currently associated with this item by user
	      context. Includes a link to <TT
CLASS="computeroutput"
>register-template</TT
> to change
	      template assignments.</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>permissions</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Lists permissions currently associated with this item. Includes
	      a link to <TT
CLASS="computeroutput"
>permission-add</TT
> to add a new permission
	      record.</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>related-links</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Lists offsite links related to this item. Includes a link to
	      add marked offsite links (from anywhere in the Bookmarks tree) to
	      the list.</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>related-items</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Lists other items related to this item. Includes a link to add
	      marked links (from anywhere in the Site Map tree) to the list.</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>workflow</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <UL
><LI
><P
CLASS="listitem"
>Gives current workflow status (active, suspended,
		    finished)</P
></LI
><LI
><P
CLASS="listitem"
>If a task is currently enabled, gives the name of the task and
		    the deadline. If the current user is assigned to the task, gives a
		    link to start the task.</P
></LI
><LI
><P
CLASS="listitem"
>If a task is currently underway (started), gives the name of
		    the task, the name of the person undertaking the task, and the
		    deadline if any. If the current user has started the task, gives a
		    link to finish the task.</P
></LI
></UL
>
	    </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>keywords</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Lists subject headings assigned to the content item. Includes a
	      link to add marked subject headings (from anywhere in the Subject
	      Headings tree) to the list.</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>revisions</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Lists the <I
CLASS="emphasis"
>n</I
> most recent revisions to the item.
	      Includes controls to change the sort order and number of revisions
	      to be displayed, as well as links to view a revision in
	      context.</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>journal</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Lists all comments made on the item to date.</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;	      <TT
CLASS="computeroutput"
>wizards</TT
></TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>List of special tasks associated with a content item (defined
	      by a custom component under
	      <TT
CLASS="computeroutput"
>custom/&#60;content_type&#62;/wizards</TT
>).</TD
></TR
></TBODY
></TABLE
></DIV
><P
>Any of these components may be incorporated into a custom
      information page using the <TT
CLASS="computeroutput"
>include</TT
> tag in the page
      template:</P
><PRE
CLASS="programlisting"
>    
    &#60;include src="../../workflow" item_id=@item_id@&#62;
        </PRE
><P
>Note that <TT
CLASS="computeroutput"
>item_id</TT
> is the only parameter required by the
      standard information components.</P
><P
>&#13;      <A
HREF="mailto:karlg@arsdigita.com"
TARGET="_top"
>karlg@arsdigita.com</A
> 
    </P
><P
>&#13;      Last revised: $Id: custom-interface.html,v 1.1 2002/07/09 17:35:03 rmello Exp $
    </P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
SIZE="1"
NOSHADE="NOSHADE"
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="dev-guide.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="dev-permissions.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Developer's guide</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="dev-guide.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Using Permissions</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>