Export (0) Print
Expand All

IfNew Element

SharePoint Team Services 1.1

The IfNew element returns TRUE if the item is considered new (usually meaning it was created before midnight the day before). This element renders the item's 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

NameDescription
NameOptional Text. Specifies the name of a field. The default value is Created.

Related Elements

Parent ElementsChild Elements
DisplayPattern, ViewBodyHTML, ImagesPath

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>

See Also

Display Pattern


Show:
© 2014 Microsoft