Help icon graphic  Click here to submit WSD Update requests for this Document. Template Language Help Help icon graphic 

Document/Content Title - a WSD property

Overview
The "title" property is maintained by WSD and can be set/modified from the WSD "Properties Screen" by those users with permission to modify the Title of any content. The Title property is typically associated with viewable content (documents rendered to a browser). The Title property can also be set for any MIME-type, such as graphics, to allow categorization of other types of content.

WSD stores all properties in its meta data database. Title information can be displayed on any page using the <$prop:title$> command from within any template. For non-document content, this command is often used in Index templates or for independent customized reporting by other programs directly from the WSD database.

The "Title" property may be shown to the content contributor as an "edit field" on the 2nd screen of an "Add/Upload" request from the "Submit New Request" screen. Content contributors will be allowed to set the "title" during "Add/Upload" requests if either of the following conditions is true:

  • if "Ignore Property Permissions when submitting ADD requests:" is set to "yes" in System Policies, or
  • if the "Title" check box is checked in "Property Update Permissions:" on the "User Permissions" screen, by the User Administrator, for the WSD user creating the new request.

The "title" property can also be exposed to data entry in Edit Layout Templates (ELT). Allowing content contributors to enter Title information from an ELT ignores the constraints (Items listed above), but requires special Java Script processing within the ELT.  An include file, stored with the other WSD samples provides the necessary Java Script code.

In the Page Layout Template place the following code:

  1. <!--[type=EDIT name="Title" property="title" hidden]--><!--[END]-->
    Note: Because this is a "hidden" field, this tag should be placed near the beginning of the PLT. To display the title value on the published page,  place the following tag at the location you want the title to display: <$prop:title$>
     

In the Edit Layout Template place the following code:

  1. Place the following <$include...> command preceding the formatted part of your template, as near to the beginning of your template as possible (all of the command MUST be on one line!):
    <$include {$prop:templatedir$$prop:slash$editlayout$prop:slash$sample_template_java_1.inc}>
  2. Place the following <input...> statement at the place in the template you want the content contributor to enter/change the title information (all of the command MUST be on one line!):
    <input type=text name="$Title$" value="<$prop:title$>" size=50 maxlength=250 onBlur="updateTitle(this)">
    Note:
    The "updateTitle" java script code referenced in the "onBlur" statement is in the file included in step 1.

Java Script Notes (code provided in include file shown in step 1 for Edit Layout Template code)

The Java script executed by the "onBlur" statement in step 2 uses a hidden field value to tell WSD when to update the title field value on the request screen. The hidden field is declared as:

<input type=hidden name=_InfoChanged value="">

The java script function source code is:

function updateTitle(currentField)
{
   if (document.forms[0]._Title)
      document.forms[0]._Title.value = currentField.value;
   document.forms[0]._InfoChanged.value = "yes";
   return true;
}

 

Copyright 2000-2002 CyberTeams, Inc., http://www.cyberteams.com All rights reserved
CyberTeams and WebSite Director are registered trademarks of CyberTeams, Inc. All other marks are the property of their respective owners.