PAGE LAYOUT TEMPLATE STATEMENTS
A Page Layout Template statement consists of the following:
- Beginning-Tag enclosed between "<!--[" and "]-->",
and consisting of three required attributes -- type=, name=, and prompt= plus any
additional attributes needed for formatting. The beginning tag can span multiple lines. For example,
<!--[type=HTMLEDIT name =
"Body" prompt="Body:<br>" width = PREFWIDTH height=10 pixelwidth= 100% pixelheight=100 wrap=
SOFT imagedir= "/images" editliveflags=15]-->
- Optional-Text that will display to the user within the template
edit field defined by the beginning tag. Note : if you are using the "View Source" option when
browsing pages created with Page Layout Templates, this will be the text entered/updated by the content
contributor.
- End-Tag that must be in the format "<!--[END]-->" and
cannot span multiple lines. Note: Any content that is included on the same line as a template tag
will be ignored.
Attributes
type=
- EDIT - Defines a single-line edit field, useful for titles, bylines,
and other short amounts of text. EDIT fields must have a "width" attribute. Example:
<!--[type=EDIT name="Title" prompt="Title: "
width=40]-->
- TEXTAREA - Defines a multi-line edit field that can be used for
any kind of content. TEXTAREA fields must have "width" and "height" attributes. Example:
<!--[type=TEXTAREA name="Title"
prompt= "Title:" width= "40" height= "10"]-->
- HTMLEDIT - Defines a multi-line edit field that uses the EditLive!
WYSIWYG control. HTMLEDIT fields must have "pixelwidth" and "pixelheight" attributes. We strongly recommend
using "width" and "height" attributes for use when the HTMLEDIT capability is not available. Example:
<!--[type=HTMLEDIT name = "Body"
prompt = "Body:<br" width=PREFWIDTH height=10 pixelwidth= 100% pixelheight=100]--> Note: The WYSIWYG editors only operate under Microsoft Internet Explorer 4.0
or later, or Netscape 4.0 or later, when JavaScript is enabled. If these conditions are not met, an HTMLEDIT
field operates exactly like a TEXTAREA field.
- IMAGE - Defines a drop-down list control which allows the content
contributor to select an image to be placed within an IMG tag for display. The IMAGE attribute requires
the presence of the "imagedir" attribute. The Optional-Text for IMAGE fields must contain at least
one HTML "<img src="" tag. When the content contributor selects an image from the choice list
of images, the location of the URL of that image will be inserted into the "src=" attribute of all HTML
"<img src="" tags encountered before the End-Tag for this Page Layout Template statement.
Example:
<!--[type=IMAGE name="Icon" prompt=
"Icon Image: " imagedir="/images"]--> <img src= border=0> Note: If the first "src=" attribute already contains a default image location,
that image will be marked as the default from the choice list of images. name=
- A descriptive term used to uniquely identify this Page Layout Template
statement referencing its purpose, content, or the identity of the content contained/defined between the
this statement's Beginning-Tag and End-Tag. For clarity, this name should match the Tag
Prompt that displays to the user.
prompt=
- This is the text that displays immediately preceding the Page Layout Template
control, and is used to identify the purpose and/or content the user is expected to contribute.
width=
- Required for EDIT or TEXTAREA fields; optional for HTMLEDIT fields. Defines
the width and characters of any EDIT or TEXTAREA fields, or HTMLEDIT fields when Java Script is enabled.
The value specified can also be the special word "PREFWIDTH", which will assign the value entered on the
User Preferences screen "Edit Online Number of Columns." Note: We strongly recommend specifying
"width=" with HTMLEDIT for those situations when a WYSIWYG editor is not available.
height=
- Required for TEXTAREA fields; optional for HTMLEDIT fields. Defines
the height of any TEXTAREA field in number of lines. The value specified can also be the special
word "PREFHEIGHT", which will assign the value entered on the User Preferences screen "Edit Online Number
of Rows." Note: We strongly recommend specifying "height=" with HTMLEDIT for those situations when
a WYSIWYG editor is not available.
pixelwidth=
- The width of the WSD WYSIWYG control in pixels or percentage. When
stated as a percentage (i.e. "100%"), it represents a percentage of the width of the browser window. The value specified can also be the special word "PREFWIDTH", which will
assign the value entered on the User Preferences screen "Screen Width (in pixels)".
pixelheight=
- The height of the WSD WYSIWYG control in pixels or percentage. When
stated as a percentage (i.e. "20%"), it represents a percentage of the height of the browser window. Warning: Pixel heights of less than 10% or less than 200
pixels will not allow the WYSIWYG editor to properly display the required toolbars
font=
- A list of available font names, each one enclosed in single quote characters
and separated by a comma. If no fonts attribute is specified the default fonts will be Times New Roman,
Arial,Helvetica and Courier.
- For example: font="'Times New Roman','Arial,Helvetica','Garamond'"
property="property-name"
- Makes the information typed into an EDIT or HTMLEDIT edit field available
for later use within the same document, by allowing the template designer to use a standard template reference
in the form "<$property-name>" to place the field contents into succeeding parts of the document.
This method eliminates errors caused by retyping a value, such as a product number, multiple times within
the same document.
- For example, this FIRST HTML code fragment allows the user
to enter the product code as part of the product description:
<P>This new slicer (Order Code:
<!--[type=EDIT name="product" prompt="Product Number: " property="prodnumber"
width=10]--> <!--[END]--> ) is the latest in a series of: Later
in the document: the template designer can reuse this property with the following HTML source fragment....
<P>When ordering, be sure to use
Order Code: <$prodnumber> wrap=
- Specifies how line wrapping occurs within TEXTAREA fields. Valid
choices are OFF, SOFT and HARD.
- Note: This attribute is ignored by Netscape browsers.
- OFF - no line wrapping occurs; the user has to manually use the Enter key
to start a new line.
- SOFT - input will wrap visibly within the edit field, but only explicit
line feeds added via the Enter key will end up in the stored content.
- HARD - all lines will wrap at the visible edge of the edit field, and the
stored content will contain line feeds at those locations.
Note:
If no "wrap=" attribute is specified, the default is OFF. imagedir=
- This attribute is mandatory for IMAGE fields, and must be specified for
an HTMLEDIT field when the template designer allows the content contributor to insert pictures. A list
of one or more directories or reserved words on the server under the Document Root. Reserved words
are $sysdir and $dirprop where $sysdir represents the directory name for images as defined on the
System Configuration screen, and $dirprop represents the name of the directory defined for images on the
Directory Properties screen for the current directory. WSD will create a list of all images for all directories
in the list, removing duplicate images. The final list of images will be listed in the IMAGE field, or
in a WSD WYSIWYG control Insert Image screen for an HTMLEDIT field.
- Example:
- imagedir=/images
- imagedir=/galaxy/images
editliveflags=
|