To get full access to the Kademi Hub existing customers can login here, or new customers can register here.
extends CommonList
This is a specialised List used for manipulating and querying resources You'll usually this to sort, group, filter lists, as well as create new lists which you can add to in the template
Properties
Name | Returns | Notes | Example |
---|---|---|---|
sortByModifiedDate | ResourceList | Returns a new list where all articles are sorted by their modified date. | |
sortByName | ResourceList | Returns a new list where all articles are sorted by their name. | |
sortByTitle | ResourceList | Returns a new list where all articles are sorted by their title, if they have one, otherwise their name | |
ofType | Map | Returns a map which you can use to filter by type |
|
dirs | ResourceList | Returns a list of only directories from this list | |
files | ResourceList | Returns a list of only files (ie not directories) from this list | |
parents | ResourceList | For each item in this list, return all of its parents up to the website |
Methods
Name | Returns | Notes | Example |
---|---|---|---|
get ( name ) | CommonResource | ||
hasChild ( name ) | boolean | ||
remove ( o ) | boolean | ||
exclude ( s ) | ResourceList | ||
exclude ( s1, s2 ) | ResourceList | ||
exclude ( s1, s2, s3 ) | ResourceList | ||
_exclude ( s ) | ResourceList | ||
excludeType ( s ) | ResourceList | Return a list containing the current elements except any resources of the given type | |
excludeType ( s1, s2 ) | ResourceList | Return a list containing the current elements except any resources of the given types | |
excludeType ( s1, s2, s3 ) | ResourceList | Return a list containing the current elements except any resources of the given types | |
excludeType ( s1, s2, s3, s4 ) | ResourceList | Return a list containing the current elements except any resources of the given types | |
ofType ( s ) | ResourceList | ||
ofTypeOr ( orTypes ) | ResourceList | ||
next ( from ) | Resource | ||
previous ( from ) | Resource | ||
sortByField ( fieldName ) | ResourceList | ||
sortByIntField ( fieldName ) | ResourceList | ||
dedupe ( ) | ResourceList | Return a list with the same items as this one, but de-duplicated based on href |