Names in File Contexts

In the current context of a file (called the current file in the following) the names listed below are available. They return the value of the type specified here (file, string, etc.) unless an equally named export variable exists which returns a value of a different type (see also npsobj_modifyvar_set as well as Export Variables).

Names Whose Value Is a File

  • parent: returns the folder containing the current file.
  • pub: returns the folder containing the current file. This name is obsolete.
  • next: returns, corresponding to the sort order to be used, the next file in the folder in which the current file is found.
  • previous: returns, corresponding to the sort order to be used, the previous file in the folder in which the current file is found.
  • self: returns the current file.
  • original: returns the the original file if the current file is a mirror file, otherwise the current file is returned.
  • up: returns the first file (on the way from the current file to the base folder), in which the value of the components following up. is not a null value. up must not be the last component of a name.

Names Whose Value Is a Link

  • link.link_title: returns the free link of the current file with the title link_title.

Names Whose Value Is a String

  • body: returns the main content of the current file.
  • contentType: returns the file name extension of the current file.
  • hasSuperLinks: returns 1 if links point to the current file, otherwise 0 is returned.
  • id: returns the ID of the current file.
  • isRoot: returns 1 if the current file is the base folder, otherwise 0 is returned.
  • name: returns the name of the current file.
  • objClass: returns the file format name of the current file.
  • objType: returns the file type name of the current file.
  • path: returns the path of the current file.
  • permissions.permissionName: returns the names of the user groups who have been granted the permissionName file permission.
  • prefixPath: If the current file is a folder, returns the path followed by a slash, otherwise returns the path.
  • title: returns the title of the current file.
  • version: returns the revision number of the current file.
  • visibleName: If the current file is a document, returns the path followed by the file name extension. If it is a folder, returns only the file name.
  • visiblePath: For documents the complete path including file name with which the file is exported; for folders the complete path including file name followed by the string /index, followed by the file name extension of the folder.
  • All fields of the types string, text, html and enum defined in the current file’s format. The string .displayValue may be attached to the names of content fields in order to determine their respective display value.
  • All export variables to which a string has been assigned.

Names Whose Value Is a Date String

  • lastChanged: returns the date of the last change to the current file. Changes in the draft version of the file are not considered in this. On exporting a released file the last change is the release.
  • validFrom: returns the date from which the content of the file is valid. This value is always set. However, it is ignored for layouts.
  • validUntil: returns the date until which the content of the file is valid. If this value is an empty value, the document has no limit on its validity. The value is ignored for layouts.
  • all fields of the type Date defined in the file format of the current file.

Names Whose Value Is a List of Strings

  • all fields of the type multienum defined in the file format of the current file.

Names Whose Value Is a List of Links

  • freeLinks: returns the list of all free links in the file, i.e. the links contained in all linklist fields.
  • subLinks: returns the list of all links in the file.
  • superLinks: returns the list of links that point to the current file.
  • textLinks: returns the list of links contained in the main content and in HTML fields of the file (except for inclusion and context links).
  • all fields of the type linklist defined in the file format of the current file.
  • all export variables containing a list of links.

Names Whose Value Is a List of Files

  • children: returns the list of all subfiles (independently of their contents) if the document is a folder, otherwise an empty list.
  • objectsToRoot: returns the list of all folders on the way from the base folder to the current file. The base folder is the first, the current file the last element in the list.
  • superObjects: returns the list of files in which a link to the current file is set.
  • toclist: returns the list of sorted subfiles that are not images or layouts.
  • all export variables containing a list of files.

Names Whose Value Is a Context List

  • all export variables containig a context list.

The names toclist, previous and next return their results depending on the predefined order of the files in a folder. This is also the case if the current context is created from a list or table element, in which the order of the files deviates from the default order because they have been sorted.