Page Publisher : Tutorial > Using PML Tags

What are PML Tags
PML stands for Publishing Markup Language. PML tags are used as place holders in an HTML page to define which content can be updated. These tags can be used to create various form fields, text areas and links. Once these tags are inserted into the HTML a specified form field will be created in the page publisher update page section. This is where the user can easily modify the defined content and update the HTML page with Page Publisher.

Tag Structure
Tags structure is very similar to HTML.

A publish tag has an open tag and a closing tag.

<!-- publish -->Content goes here <!-- /publish -->

A publish tag can include 2 main attributes, type and name.

<!-- publish type="textbox" name="About Us Content" -->Content goes here <!-- /publish -->

For textboxes there is a special third attribute "rows" which can be included to specify the size of the textbox. This is useful if you want to make an extra large textbox.

<!-- publish type="textbox" name="Page Content" rows=20 -->Content goes here <!-- /publish -->

Type: This is where you specify the type of content the tag will represent. Values can be: textbox, textfield, link, email or image. If you don't specify a type the default is 'textbox'.

Name : This is the name of the content that is to be updated. The name will be displayed beside the textbox or text field in Page Publisher. Giving content fields a name makes it easier for a user to tell the different between a 'title' field and a 'content' field.

All PML tags and Attributes

The attribute "name" is common to all PML types.

HTML Attributes
Some PML tags will preserve any HTML attributes you put in the content manually (i.e. through the Edit HTML pane, rather than the Update page). For example, you can put things like border="1" for images or target="_new" for links. Currently HTML is preserved in these types: image, link, email, image_select, and file_select.


Type Description Attributes
type="textbox" Text Boxes
Text boxes are the default type but can be specified as well:
<!-- publish type="textbox" name="text box name" rows=16 format="text" -->
<!-- /publish -->
rows=16 - this is the number of rows long the text box will be.
format="html" or "text" - this selects the format that users will use to enter content in the text box.
type="wysiwyg" Text Boxes with WYSIWYG editor enabled
To enable the WYSIWYG editor for any text box, add the following:
<!-- publish type="wysiwyg" name=" text box name " rows=16 -->
<!-- /publish -->
rows=16 - this is the number of rows long the WYSIWYG text box will be.
type="textfield" Text Fields
A textfield attribute is assigned as follows:
<!-- publish type="textfield" -->
<!-- /publish -->
n/a
type="link" Links
You can create a link as well, the user can then edit the link name and URL:
<!-- publish type="link" -->
<!-- /publish -->
HTML attributes - any attributes you have in the HTML tags are preserved. These attributes do not need to be put in the PML tag.
type="email" Email Links
This will create an email link such as <a href="mailto:email@link.com">. The user can change the name of the link and the email address:
<!-- publish type="email" -->
<!-- /publish -->
HTML attributes - any attributes you have in the HTML tags are preserved. These attributes do not need to be put in the PML tag.
type="image" Image Source
This will create an image that can be changed easily in the admin section:
<!-- publish type="image" editalt="yes" rows="2" -->
<!-- /publish -->
editalt="yes" - this displays the image's alt text as an editable field
rows="2" - this is the number of rows for the Alt text edit box
HTML attributes - any attributes you have in the HTML tags are preserved. These attributes do not need to be put in the PML tag.
type="image_select" Image Selection
This creates a dropdown of uploaded images.  Users can upload images or record links to images which will be placed in the page:
<!-- publish type="image_select" allowupload="yes" uploaddir="" allowremove="no" editalt="yes" rows="2" -->
<!-- /publish -->
editalt="yes" - this displays the image's alt text as an editable field
allowlink="yes" With allowlink="yes", image_select will have a new field, "Link To". The published image will link to the URL path you put in that Update field.
rows="2" - this is the number of rows for the Alt text edit box
HTML attributes - any attributes you have in the HTML tags are preserved. These attributes do not need to be put in the PML tag.

allowurl="yes"
  - If set to "yes" (default), users are allowed to add an URL (referencing an image or file) to the image and file select pulldowns.
  - If set to "no", users are not allowed to add URLs.
allowupload="yes"
  - If set to "yes", users are allowed to upload files to the server for selection from the image_select and file_select pulldowns.
  - If set to "no" (default), users are not allowed to upload files.
allowadd="yes"
  - If set to "yes" (default), displays the add button with the fields to allow the adding of image/file URLs (or optionally uploaded files).
  - If set to "no", the add button is not displayed, regardless of the allowupload and allowurl attributes.

allowremove="yes"
  - If set to "yes", users are allowed to remove images/files from the server.
  - If set to "no", users are not allowed to remove images/files from the server.
  - If this attribute is missing from the tag, users are not allowed to remove files.

uploaddir="" or uploaddir="sub_directory" or uploaddir="sub_dir/sub_sub_dir" etc.
  - Without this attribute, files are uploaded to the upload directory as defined in Setup Options. Any *_select tag with a subdirectory named will use that directory instead.
  - The upload directory may contain as many sub directories as you like, allowing you to organize your uploaded files.



type="file_select" File Selection
This creates a dropdown of uploaded files.  Users can upload files or record links to files which will be placed in the page as a hyperlink.  When updating a page, users can enter the text used to link to the file:
<!-- publish type="file_select" allowupload="no" uploaddir="" allowremove="yes" -->
<!-- /publish -->
See image_select above for descriptions of these attributes:

allowupload="yes"
allowurl="yes"
allowadd="yes"
allowremove="yes"
uploaddir="sub_directory"