Public Method Author API

getLocation()

Gets the current location of the Author app.

You would want to use this method so that you can detect which view the author is currently looking at, for example.

Examples

var authorLocation = authorApp.getLocation();
console.log(authorLocation);

/* When in the Item editor, may return:
{
    "location": "items/10f60f73-60bd-4fdb-812a-728800af68e3",
    "locationEncoded": "items/10f60f73-60bd-4fdb-812a-728800af68e3",
    "route": "items/:reference"
}
*/

Arguments

None.

Return value

object

Related articles

  • The navigate() method, which allows you to navigate to a new view within the Author API.
Was this article helpful?