# Class Folder

- [TopLevel.Object](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md)
  - [dw.object.PersistentObject](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.PersistentObject.md)
    - [dw.object.ExtensibleObject](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.ExtensibleObject.md)
      - [dw.content.Folder](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md)

Class representing a folder for organizing content assets in Commerce Cloud Digital.

## Property Summary

| Property                                                                                                                                            | Description                                                                                                                 |
| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [ID](#id): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`                                         | Returns the ID of the folder.                                                                                               |
| [content](#content): [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md) `(read-only)`                        | Returns the content objects for this folder, sorted by position.                                                            |
| [description](#description): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`                       | Returns the description for the folder as known in the current  locale or null if it cannot be found.                       |
| [displayName](#displayname): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`                       | Returns the display name for the folder as known in the current  locale or null if it cannot be found.                      |
| [online](#online): [Boolean](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Boolean.md) `(read-only)`                               | Indicates if the folder is set online or  offline.                                                                          |
| [onlineContent](#onlinecontent): [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md) `(read-only)`            | Returns the online content objects for this folder, sorted by position.                                                     |
| [onlineSubFolders](#onlinesubfolders): [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md) `(read-only)`      | Returns the online subfolders of this folder, sorted by position.                                                           |
| [pageDescription](#pagedescription): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`               | Returns the page description for this folder using the value in  the current locale, or returns null if no value was found. |
| [pageKeywords](#pagekeywords): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`                     | Returns the page keywords for this folder using the value in  the current locale, or returns null if no value was found.    |
| [pageTitle](#pagetitle): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`                           | Returns the page title for this folder using the value in  the current locale, or returns null if no value was found.       |
| [pageURL](#pageurl): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`                               | Returns the page URL for this folder using the value in  the current locale, or returns null if no value was found.         |
| [parent](#parent): [Folder](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md) `(read-only)`                               | Returns the parent folder of this folder.                                                                                   |
| [root](#root): [Boolean](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Boolean.md) `(read-only)`                                   | Indicates if this is the root folder.                                                                                       |
| [siteMapChangeFrequency](#sitemapchangefrequency): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)` | Returns the folder's sitemap change frequency.                                                                              |
| [siteMapIncluded](#sitemapincluded): [Number](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Number.md) `(read-only)`               | Returns the folder's sitemap inclusion.                                                                                     |
| [siteMapPriority](#sitemappriority): [Number](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Number.md) `(read-only)`               | Returns the folder's sitemap priority.                                                                                      |
| [subFolders](#subfolders): [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md) `(read-only)`                  | Returns the subfolders of this folder, sorted by position.                                                                  |
| [template](#template): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`                             | Returns the name of the template used to render the folder  in the store front.                                             |

## Constructor Summary

This class does not have a constructor, so you cannot create it directly.

## Method Summary

| Method                                                                                                                              | Description                                                                                                                 |
| ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [getContent](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getcontent)()                               | Returns the content objects for this folder, sorted by position.                                                            |
| [getDescription](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getdescription)()                       | Returns the description for the folder as known in the current  locale or null if it cannot be found.                       |
| [getDisplayName](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getdisplayname)()                       | Returns the display name for the folder as known in the current  locale or null if it cannot be found.                      |
| [getID](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getid)()                                         | Returns the ID of the folder.                                                                                               |
| [getOnlineContent](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getonlinecontent)()                   | Returns the online content objects for this folder, sorted by position.                                                     |
| [getOnlineSubFolders](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getonlinesubfolders)()             | Returns the online subfolders of this folder, sorted by position.                                                           |
| [getPageDescription](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getpagedescription)()               | Returns the page description for this folder using the value in  the current locale, or returns null if no value was found. |
| [getPageKeywords](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getpagekeywords)()                     | Returns the page keywords for this folder using the value in  the current locale, or returns null if no value was found.    |
| [getPageTitle](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getpagetitle)()                           | Returns the page title for this folder using the value in  the current locale, or returns null if no value was found.       |
| [getPageURL](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getpageurl)()                               | Returns the page URL for this folder using the value in  the current locale, or returns null if no value was found.         |
| [getParent](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getparent)()                                 | Returns the parent folder of this folder.                                                                                   |
| [getSiteMapChangeFrequency](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getsitemapchangefrequency)() | Returns the folder's sitemap change frequency.                                                                              |
| [getSiteMapIncluded](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getsitemapincluded)()               | Returns the folder's sitemap inclusion.                                                                                     |
| [getSiteMapPriority](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getsitemappriority)()               | Returns the folder's sitemap priority.                                                                                      |
| [getSubFolders](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#getsubfolders)()                         | Returns the subfolders of this folder, sorted by position.                                                                  |
| [getTemplate](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#gettemplate)()                             | Returns the name of the template used to render the folder  in the store front.                                             |
| [isOnline](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#isonline)()                                   | Indicates if the folder is set online or  offline.                                                                          |
| [isRoot](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md#isroot)()                                       | Indicates if this is the root folder.                                                                                       |

### Methods inherited from class ExtensibleObject

[describe](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.ExtensibleObject.md#describe), [getCustom](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.ExtensibleObject.md#getcustom)

### Methods inherited from class PersistentObject

[getCreationDate](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.PersistentObject.md#getcreationdate), [getLastModified](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.PersistentObject.md#getlastmodified), [getUUID](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.PersistentObject.md#getuuid)

### Methods inherited from class Object

[assign](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#assignobject-object), [create](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#createobject), [create](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#createobject-object), [defineProperties](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#definepropertiesobject-object), [defineProperty](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#definepropertyobject-object-object), [entries](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#entriesobject), [freeze](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#freezeobject), [fromEntries](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#fromentriesiterable), [getOwnPropertyDescriptor](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#getownpropertydescriptorobject-object), [getOwnPropertyNames](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#getownpropertynamesobject), [getOwnPropertySymbols](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#getownpropertysymbolsobject), [getPrototypeOf](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#getprototypeofobject), [hasOwnProperty](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#hasownpropertystring), [is](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#isobject-object), [isExtensible](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#isextensibleobject), [isFrozen](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#isfrozenobject), [isPrototypeOf](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#isprototypeofobject), [isSealed](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#issealedobject), [keys](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#keysobject), [preventExtensions](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#preventextensionsobject), [propertyIsEnumerable](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#propertyisenumerablestring), [seal](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#sealobject), [setPrototypeOf](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#setprototypeofobject-object), [toLocaleString](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#tolocalestring), [toString](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#tostring), [valueOf](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#valueof), [values](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#valuesobject)

## Property Details

### ID

- ID: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`
  - : Returns the ID of the folder. The ID can be used to uniquely
    identify a folder within any given library. This folder ID provides
    an alternative lookup mechanism for folders frequently used in
    the storefront.

***

### content

- content: [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md) `(read-only)`
  - : Returns the content objects for this folder, sorted by position.

***

### description

- description: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`
  - : Returns the description for the folder as known in the current
    locale or null if it cannot be found.

***

### displayName

- displayName: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`
  - : Returns the display name for the folder as known in the current
    locale or null if it cannot be found.

***

### online

- online: [Boolean](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Boolean.md) `(read-only)`
  - : Indicates if the folder is set online or
    offline. Initially, all folders are set online.

***

### onlineContent

- onlineContent: [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md) `(read-only)`
  - : Returns the online content objects for this folder, sorted by position.

***

### onlineSubFolders

- onlineSubFolders: [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md) `(read-only)`
  - : Returns the online subfolders of this folder, sorted by position.

***

### pageDescription

- pageDescription: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`
  - : Returns the page description for this folder using the value in
    the current locale, or returns null if no value was found.

***

### pageKeywords

- pageKeywords: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`
  - : Returns the page keywords for this folder using the value in
    the current locale, or returns null if no value was found.

***

### pageTitle

- pageTitle: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`
  - : Returns the page title for this folder using the value in
    the current locale, or returns null if no value was found.

***

### pageURL

- pageURL: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`
  - : Returns the page URL for this folder using the value in
    the current locale, or returns null if no value was found.

***

### parent

- parent: [Folder](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md) `(read-only)`
  - : Returns the parent folder of this folder.

***

### root

- root: [Boolean](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Boolean.md) `(read-only)`
  - : Indicates if this is the root folder.

***

### siteMapChangeFrequency

- siteMapChangeFrequency: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`
  - : Returns the folder's sitemap change frequency.

***

### siteMapIncluded

- siteMapIncluded: [Number](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Number.md) `(read-only)`
  - : Returns the folder's sitemap inclusion.

***

### siteMapPriority

- siteMapPriority: [Number](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Number.md) `(read-only)`
  - : Returns the folder's sitemap priority.

***

### subFolders

- subFolders: [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md) `(read-only)`
  - : Returns the subfolders of this folder, sorted by position.

***

### template

- template: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`
  - : Returns the name of the template used to render the folder
    in the store front.

***

## Method Details

### getContent()

- getContent(): [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md)
  - : Returns the content objects for this folder, sorted by position.

    **Returns:**

    - the content objects for this folder, sorted by position.

***

### getDescription()

- getDescription(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the description for the folder as known in the current
    locale or null if it cannot be found.

    **Returns:**

    - the description for the folder as known in the current
      locale or null if it cannot be found.

***

### getDisplayName()

- getDisplayName(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the display name for the folder as known in the current
    locale or null if it cannot be found.

    **Returns:**

    - the display name for the folder as known in the current
      locale or null if it cannot be found.

***

### getID()

- getID(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the ID of the folder. The ID can be used to uniquely
    identify a folder within any given library. This folder ID provides
    an alternative lookup mechanism for folders frequently used in
    the storefront.

    **Returns:**

    - the ID of the folder.

***

### getOnlineContent()

- getOnlineContent(): [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md)
  - : Returns the online content objects for this folder, sorted by position.

    **Returns:**

    - the online content objects for this folder, sorted by position.

***

### getOnlineSubFolders()

- getOnlineSubFolders(): [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md)
  - : Returns the online subfolders of this folder, sorted by position.

    **Returns:**

    - the online subfolders of this folder, sorted by position.

***

### getPageDescription()

- getPageDescription(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the page description for this folder using the value in
    the current locale, or returns null if no value was found.

    **Returns:**

    - the page description for this folder using the value in
      the current locale, or returns null if no value was found.

***

### getPageKeywords()

- getPageKeywords(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the page keywords for this folder using the value in
    the current locale, or returns null if no value was found.

    **Returns:**

    - the page keywords for this folder using the value in
      the current locale, or returns null if no value was found.

***

### getPageTitle()

- getPageTitle(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the page title for this folder using the value in
    the current locale, or returns null if no value was found.

    **Returns:**

    - the page title for this folder using the value in
      the current locale, or returns null if no value was found.

***

### getPageURL()

- getPageURL(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the page URL for this folder using the value in
    the current locale, or returns null if no value was found.

    **Returns:**

    - the page URL for this folder using the value in
      the current locale, or returns null if no value was found.

***

### getParent()

- getParent(): [Folder](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.content.Folder.md)
  - : Returns the parent folder of this folder.

    **Returns:**

    - the parent folder of this folder.

***

### getSiteMapChangeFrequency()

- getSiteMapChangeFrequency(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the folder's sitemap change frequency.

    **Returns:**

    - the value of the attribute 'siteMapChangeFrequency'.

***

### getSiteMapIncluded()

- getSiteMapIncluded(): [Number](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Number.md)
  - : Returns the folder's sitemap inclusion.

    **Returns:**

    - the value of the attribute 'siteMapIncluded'.

***

### getSiteMapPriority()

- getSiteMapPriority(): [Number](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Number.md)
  - : Returns the folder's sitemap priority.

    **Returns:**

    - the value of the attribute 'siteMapPriority'.

***

### getSubFolders()

- getSubFolders(): [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md)
  - : Returns the subfolders of this folder, sorted by position.

    **Returns:**

    - the subfolders of this folder, sorted by position.

***

### getTemplate()

- getTemplate(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the name of the template used to render the folder
    in the store front.

    **Returns:**

    - the name of the template used to render the folder.

***

### isOnline()

- isOnline(): [Boolean](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Boolean.md)
  - : Indicates if the folder is set online or
    offline. Initially, all folders are set online.

    **Returns:**

    - true if the folder is online, false otherwise.

***

### isRoot()

- isRoot(): [Boolean](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Boolean.md)
  - : Indicates if this is the root folder.

    **Returns:**

    - true if this is the root folder, false otherwise.

***
