FileSystemCollection
Extends:
A collection that derives its content from the location of a file in the file system.
Constructor Summary
Public Constructor | ||
public |
constructor(name: *, collectionConfig: *, config: *, renderer: *) |
Member Summary
Public Members | ||
public |
Array of paths to exclude from including in this collection. |
|
public |
Array of file id's that belong in this collection. |
|
public |
pages: *[] |
Method Summary
Public Methods | ||
public |
Add a file to the collection. |
|
public |
Create CollectionPage objects for our Collection. |
|
public |
Populate the Collection's files via file system path or metadata attribute. |
Inherited Summary
From class CollectionBase | ||
public static |
Sorts files according to a sort config object. |
|
public |
Data accesible to templates. |
|
public |
Unique ID of this Collection, currently its given name. |
|
public |
Metadata attribute to use to find which items are within the collection. |
|
public |
The collection name. |
|
public |
Size of each CollectionPage. |
|
public |
Array of CollectionPage objects. |
|
public |
Path where items belong within the collection. |
|
public |
Permalink information. |
|
public |
Sorting configuration. |
|
public |
What template to use when rendering a CollectionPage. |
|
protected |
|
|
protected |
|
|
public |
createPage(index: number, pageIdArg: string): CollectionPage Create a CollectionPage instance. |
|
public |
isFiltered(file: File): boolean Whether a File is filtered by the configured filters. |
|
public |
populate(files: Object<string, Files>, collections: Object<string, CollectionBase>): CollectionBase Populate the Collection's files via file system path or metadata attribute. |
|
public |
Writes every page in this collection. |
Public Constructors
public constructor(name: *, collectionConfig: *, config: *, renderer: *) source
Create a Collection instance.
Override:
CollectionBase#constructorParams:
Name | Type | Attribute | Description |
name | * | ||
collectionConfig | * | ||
config | * | ||
renderer | * |
Public Members
Public Methods
public addFile(file: File): boolean source
Add a file to the collection.
Params:
Name | Type | Attribute | Description |
file | File | File object. |
public populate(files: Object<string, Files>, collections: Object<string, CollectionBase>): Collection source
Populate the Collection's files via file system path or metadata attribute.
Override:
CollectionBase#populateParams:
Name | Type | Attribute | Description |
files | Object<string, Files> | All Files. |
|
collections | Object<string, CollectionBase> |
|
Object of all collections. |
Return:
Collection |