Share via


IfNew Element

The IfNew element returns TRUE if the item is considered new (usually meaning it was created since midnight the day before). This element renders the body of the item body if it was created today (the number of days is a registry setting, for which the default value is 1).

Syntax

<IfNew
  Name = "Text">
</IfNew>

Attributes

Name Description
Name Optional Text. Specifies the name of a field. The default value is Created.

Example

The following example displays a particular logo if the display pattern of the field is new.

<DisplayPattern>
  <IfNew>
    <HTML>
      <![CDATA[ <IMG SRC=" ]]>
    </HTML>
    <ImagesPath />
    <HTML>
      <![CDATA[ newlink.gif" alt=" ]]>
    </HTML>
    <HTML>
      New
    </HTML>
    <HTML>
      <![CDATA["> ]]>
    </HTML>
  </IfNew>
</DisplayPattern>