+

Search Tips   |   Advanced Search

Create a property tag

A property tag is used to display fields and metadata from content items and site areas. The format of a property tag:

    [Property field=" " context=" " type=" " name=" " format=" " link=" " separator=" " htmlencode=" " awareness=" " ifEmpty=" " include=" " restrict=" " resolve=" " start=" " end=" " ]

To create a property tag:

  1. Click Insert a Tag from a presentation template or element design field.

  2. Select Property as the tag type.

  3. Select a property type. This is added to the tag as the field=" " parameter:

      Property type Details
      Identification
      Name Text entered in the name field of an item.
      Title Text entered in the title field of an item.
      Description Text entered in the description field of an item.
      Authors Users and groups selected in the authors field of an item.
      Owners Users and groups selected in our owners field of an item.
      ID GUID of an item.
      Authoring template
      authtemplateid GUID of the authoring template used by the current item.
      authtemplatename Name of the authoring template used by the current item.
      authtemplatetitle Title of the authoring template used by the current item.
      History
      lastmodified Last modified date and the last change message.
      lastmodifieddate Last modified date.
      creation Creation date.
      lastmodifier Name of the user who last modified the item.
      creator Name of the user who created the item.
      Current project
      ProjectId GUID of the project the current item is included in.
      ProjectName Item name of the project the current item is included in.
      ProjectTitle Title of the project the current item is included in.
      Profiling
      Categories List of categories that an item has been profiled with.
      Keywords List of Keywords that an item has been profiled with.
      Access level
      User List of users and groups assigned user access to an item.
      Contributor List of users and groups assigned contributor access to an item.
      Editor List of users and groups assigned editor access to an item.
      Manager List of users and groups assigned manager access to an item.
      Workflow Properties
      Status Workflow status of an item.
      Workflow Selected workflow of an item.
      Current Stage Workflow stage the item is currently in.
      Publish Date Date and time selected in the publish date field of an item.
      Expiry Date Date and time selected in the expiry date field of an item.
      General Date One Date and time selected in the general date one field of an item.
      General Date Two Date and time selected in the general date two field of an item.
      Additional Viewers Names of any additional viewers selected for an item.

  4. Select the item type and the context used to determine which item to reference:

      Context and Item Type type="auto" type="content" type="sitearea" type="parent" type="top"
      context="Selected"

      The context is set by the selected item. We select an item by clicking Select. This is added to the tag as the name=" " parameter:

      Display the property of the selected item. Display the property of the selected content item. If a site area is selected then nothing will be displayed. If the selected item is a site area, then this will display the property of the site area If the selected item is a content item, then this will display the property of the parent site area of the content item. Display the property of the parent of the selected item. Display the property of the first item in the path of the selected item.
      context="Current"

      The context is set by the current item.

      Display the property of the item currently being rendered. Display the property of the current content item. If a site area is selected then nothing will be displayed. If the item currently being rendered is a site area, this will display the property of the current site area. If the item currently being rendered is a content item, this will display the property of the parent site area of the content item. Display the property of the parent site area of the item currently being rendered. Display the property of the first item in the path of the item currently being rendered.
      context="Autofill"

      Use this option when the item being referenced is determined by the search parameters of a menu, navigator, or taxonomy component. If the tag is not used within a menu, navigator, or taxonomy component, the context will revert to the current item.

      Display the property of the item returned by a menu, navigator, or taxonomy component. Display the property of a content item returned by a menu, navigator, or taxonomy component. If a site area is selected then nothing will be displayed. If the current item returned by a menu, navigator, or taxonomy component is a site area, then the property of the site area will be displayed. If the current item returned by a menu, navigator, or taxonomy component is a content item, then the property of the parent of the content item will be displayed. Display the property of the parent item of the item returned by a menu, navigator, or taxonomy component. Display the property of the first item in the path of the item returned by a menu, navigator, or taxonomy component.
      context="portalContext"

      The context is set by the context of the current page. This option is only valid for content delivered using a web content viewer portlet.

      Display the property of the current page context item. If the context of the current page is a content item, the property of the current content item is displayed. If the context of the current page is a site area, the property of the default content item of the site area is displayed. If the context of the current page is a site area, the property of the site area is displayed. If the context of the current page is a content item, the property of the parent of the content item is displayed. Display the property of the parent of the current page context item. Display the property of the first item in the path of the current page context item.
      context="portalMapping"

      The context is set by the content mapping of the current page. This option is only valid for content delivered using a web content viewer portlet.

      Display the property of the item selected as the default content mapping of the page. Display the property of the default content item of the site area selected as the default content mapping of the page. Display the property of the site area selected as the default content mapping of the page. Display the property of parent of the item selected as the default content mapping of the page. Display the property of the first item in the path of the item selected as the default content mapping of the page.

  5. Click OK to add the tag to your design.


What to do next

Once we have added the tag to the design, we can also add the following parameters to the tag:

    Tag Details
    name=" " Name of the item being referenced if the context="selected". If we specify name="./itemName", the actual path is not resolved until the item is rendered. This takes slightly longer to resolve than specifying the path to the item.
    format=" " Optional. Can only be used with some element types:

    When field="ID":

    • format="id" displays the plain ID. If not specified, this format is used by default.
    • format="uri" outputs a wcm:oid:<id> style URI.

    When referencing user details: When formatting user details, the format parameter is used to define which LDAP parameter to use when displaying user details. For example:

    • format="cn" is used to display the common name.
    • format="dn" is used to display the distinguished name.

    When field="categories": When field="categories" the format parameter is used to determine the output format.

    • format="title" displays a list of category titles.
    • format="uri" displays a wcm:oid:<id> style URI for each listed category.

    Maximum character length: We can also specify a maximum number of characters to display using this format:

    • format="length:number_of_characters"

    For example, to display a maximum of ten characters we would specify the following parameter:

    • format="length:10"

    When referencing date elements: The following formats can be defined when displaying dates:

    • format="DATE_SHORT"
    • format="DATE_MEDIUM"
    • format="DATE_LONG"
    • format="DATE_FULL"
    • format="DATE_TIME_SHORT"
    • format="DATE_TIME_MEDIUM"
    • format="DATE_TIME_LONG"
    • format="DATE_TIME_FULL"
    • format="TIME_SHORT"
    • format="TIME_MEDIUM"
    • format="TIME_LONG"
    • format="TIME_FULL"
    • format="DATE_SHORT_TIME_MEDIUM"
    • format="DATE_SHORT_TIME_LONG"
    • format="DATE_SHORT_TIME_FULL"
    • format="DATE_MEDIUM_TIME_SHORT"
    • format="DATE_MEDIUM_TIME_LONG"
    • format="DATE_MEDIUM_TIME_FULL"
    • format="DATE_LONG_TIME_SHORT"
    • format="DATE_LONG_TIME_MEDIUM"
    • format="DATE_LONG_TIME_FULL"
    • format="DATE_FULL_TIME_SHORT"
    • format="DATE_FULL_TIME_MEDIUM"
    • format="DATE_FULL_TIME_LONG"
    • format="RELATIVE" (The relative date is displayed as either "today", "yesterday" or the number of days ago.)
    • format="MILLIS" (Number of milliseconds since Midnight, January 1, 1970 GMT)

    We can also set user-defined formats for dates:

    When referencing number elements: We can also set user-defined formats for numbers:

    separator=" " This is used when referencing a property that returns multiple results. For example, to add a line break between each result, we would use separator="<br>" . If not defined, a comma is placed between each result when rendered.
    htmlencode=" " If htmlencode="true" any reserved HTML characters is converted into character entities. For example, '<' is converted to '&lt;'. This is useful if to prevent users adding malicious code, or to prevent users changing the look and feel of their text using HTML. If not specified, the default setting specified by the cmpnt.htmlEncodeDefault property in the WCM WCMConfigService service is used. By default, this property is set to true.
    awareness=" " If awareness="true" then user names are displayed using the people awareness features. This feature displays user names as hyperlinks that allow users to contact people with whom they might want to work. Wherever person links appear, users can click the link to display a menu of actions for collaborating (contacting and working) with the person named by the link. If we, as administrator, have also configured an IBM Sametime server to work with WebSphere Portal, person links indicate whether a person is active, away, offline, or in a Do Not Disturb state. If not specified, then awareness="false" and people awareness is not used.
    ifEmpty=" " Enter some text to display if no result is returned by the tag. If not specified, nothing is displayed if no result is returned by the tag.
    include=" " Used only with field=categories. Determines which level of a taxonomy to display:

    • exact
    • ancestors
    • descendants
    • all

    For example, if an item is profiled with a category of Sport, and include=descendants, then all the descendants of "sport" would also be displayed.

    restrict=" " Used only with field=library/categories. Enter a list of categories separated by commas to only return results for the categories specified in the list. For example, restrict="library/red, library/green" only displays profile details of items profiled with the categories of red or green. If no library is specified, the default library is used.
    resolve=" "
    none Only users and groups selected in the access section of an item is resolved. This is a combination of User, Workflow, and Administrator defined access settings. Virtual users are not resolved. If the field parameter is used, only users and groups directly selected for a role type is resolved. For example, a user assigned "contributor" access would not be resolved if field="user".
    virtual Only users and groups selected in the access section of an item, including virtual users, is resolved. This is a combination of User, Workflow, and Administrator defined access settings. If the field parameter is used, only users and groups directly selected for a role type is resolved. For example, a user assigned "contributor" access would not be resolved if field="user".
    inherited All inherited users and groups plus users and groups selected in the access section of an item, including virtual users, is resolved. This is a combination of Inherited, User, Workflow, and Administrator defined access settings. If the field parameter is used, only users and groups that are either directly selected for a role type or that inherit a role type is resolved. For example, a user assigned "contributor" access would not be resolved if field="user".
    inheritedonly Only inherited users and groups, including virtual users, are resolved. If the field parameter is used, only users and groups that directly inherit a role type is resolved. For example, a user that inherits "contributor" access would not be resolved if field="user".
    effective Only users and groups selected in the access section of an item, including virtual users, is resolved. This is a combination of User, Workflow, and Administrator defined access settings. If the field parameter is used, access roles are cascaded down so that users and groups assigned roles higher than the role selected using the field parameter is resolved. For example, if field="user", contributors, editors, and managers are also resolved.
    all All inherited users and groups plus users and groups selected in the access section of an item, including virtual users, is resolved. This is a combination of Inherited, User, Workflow, and Administrator defined access settings. If the field parameter is used, access roles are cascaded down so that users and groups assigned roles higher than the role selected using the field parameter is resolved. For example, if field="user", contributors, editors, and managers are also resolved.

    start=" "

    end=" "

    The start and end attributes are used to wrap the data returned by a tag within other tags, such as HTML. These attributes are not mandatory.

Double-byte character sets:

Not all double-byte character sets support extended ASCII. To use tags such as "&nbsp;" replace "&" with "&amp;". For example:

    separator="&amp;nbsp;&amp;nbsp;"


Parent Create web content tags