WARNING: The [sjs-3] engine was deprecated, use [sjs-4] instead.

File.prototype.isPage()

Tells whether a file is a page.

Syntax

// Get file.isPage() boolean

Description

Tells whether a file is a page. A file is a page if a .Page file exists on its type chain.

The purpose of the isPage method is to provide a convenient way to find pages that need to be shown in a menu, etc..

Examples

Get.

Example for marking a file as a page by creating a file named .Page on its type chain.

Example for marking the an anonymous app as a page - thus the file itself as a page. Because of the type app-1 the file becomes an anonymous app, so the .Page file will be looked for on the file itself.

Get all pages.