A frontend is used to easily get content in the form of pages. Pages contain all information you
might need in the frontend of your website. See PageApi for more info.
Use a frontend to display content.
Variables
read onlycontentModified:Float
Returns a timestamp of the last time any content in this site was modified
Methods
basicSearch (query:String, from:Int, amount:Int, ?channels:Array<String>):Array<PageReference>
Returns all references to pages with a title containing the search query
countSearch (query:String, ?channels:Array<String>):Int
Returns the amount of pages with a title containing the search query
getPageByKey (key:String):PageApi
Returns a PageApi instance based on an entry key, which can be set in the settings tab
getPageByPath (path:String):PageApi
Returns a PageApi instance based on an path. The path is expected to exactly match the full_path of an Entry.
Strip any base dirs or query before requesting.
getPageOnPosition (criteria:SortingCriteria, position:Int):PageApi
Get the page on the given position, this is the position this page would have when all pages are sorted with the given criteria.
getPagePosition (criteria:SortingCriteria, page:PageApi):Int
Get the position a certain page would have when all pages of this channel are sorted with the given criteria.
getPagesEndingWithPathPiece (pathPiece:String):Array<PageApi>
Returns all PageApi instances of which the path ends with the given piece.
getPagesSorted (criteria:SortingCriteria, ?from:Int, ?amount:Int):Array<PageApi>
Get all pages sorted by the given criteria
getRecentlyModifiedEntries (amount:Int = 10, ?excludedChannels:Array<String>):Array<PageReference>
Returns all entries that were recently modified
getStructure (ids:Array<Int>, levels:Int = 1):Array<StructureNode>
Get a structure of all children levels deep. Can be used to build a site's menu.
search (query:String, from:Int, amount:Int, ?channels:Array<String>):Array<PageApi>
Returns all pages with a title containing the search query
searchDocument (query:String, from:Int, amount:Int):Array<FileReference>
Returns all references to pages with a title containing the search query
setSorting (channel:String, keys:Array<SortKey>):Void
Set the sorting order used for a certain channel. In order to use this functionality you need to define an index in the CMS for this channel/key.