A page contains all information to display a page on your website frontend.
Get any field's content using the field method.
All other data can be found in the public properties.
Variables
Methods
childrenToJson (?options:ToJsonOptions, ?channels:Array<String>, extras:Bool = true):Array<JSONValue>
field (key:String, raw:Bool = false):Dynamic
Returns data of the field identified by key. Type of return is different based on the field's content.
If the field's content is text, it will return a String.
If the field is an image, this will return an instance of ImageHandler which you can use to transform the image.
If the field is a collection, it will return an array containing FieldApi instances.
getChild (position:Int, ?keys:Array<SortKey>):PageApi
Returns the child on the given position This function assumes there is only 1 allowed channel and all children have this channel
getChildrenSubset (startPos:Int, amount:Int = 40, ?keys:Array<SortKey>):Array<PageApi>
Returns a subset of all the children based on the given position and amount This function assumes there is only 1 allowed channel and all children have this channel
getNext (?keys:Array<SortKey>):PageApi
Returns the next page amongst all the children of his parent (with the same channel)
getNextGlobal (?keys:Array<SortKey>):PageApi
Returns the next page amongst all the pages with this channel
getNumberOfChildren (?keys:Array<SortKey>):Int
Returns the amount of children this page taking sorting criteria into account (min and max criteria influence the result) This function assumes there is only 1 allowed channel and all children have this channel
getPosition (?keys:Array<SortKey>):Int
Returns the position of this page amongst all the children of his parent (with the same channel)
getPositionGlobal (?keys:Array<SortKey>):Int
Returns the position of this page amongst all the pages with this channel
getPrevious (?keys:Array<SortKey>):PageApi
Returns the previous page amongst all the children of his parent (with the same channel)
getPreviousGlobal (?keys:Array<SortKey>):PageApi
Returns the previous page amongst all the pages with this channel
getRecentlyModifiedChildren (amount:Int = 10):Array<PageReference>
Returns all child entries that were recently modified
getReferencedImagePaths (keyToWysiwyg:String):Array<String>
Returns all the image paths contained in this Wysiwyg
toJson (?options:ToJsonOptions, extras:Bool = true):JSONValue
Returns a processed representation of all the data data in this page.