OneEntry Platform 2.0.1 Help

Pages

Kotlin Multiplatform

Get all pages

val pages = PagesService.pages("en_US")

Hierarchy

OneEntry CMS has a mechanism of page nesting, which allows creating groups and content hierarchy.

Get all top-level pages

Top-level pages are pages that do not have a parent (parentId = null).

val pages = PagesService.root("en_US")

Get all child pages

Child pages are pages that are not the first in the hierarchy (parentId ≠ null). To retrieve them, you need to know the parent's url.

val children = PagesService.children("dev", "en_US")

Get a page

Each page object has its identifier (id) and link (url). With them, you can get an object with all the necessary information.

By identifier

val page = PagesService.page(id = 8, langCode = "en_US")

By link

val page = PagesService.page(url = "dev", langCode = "en_US")

Get blocks attached to the page

Blocks attached to the page can be obtained by knowing its url.

val blocks = PagesService.blocks(url = "dev", langCode = "en_US")

Get page configuration

Page configuration is customized in CMS and mainly contains pagination information.

val config = PagesService.config("dev")

Pages can be found by knowing their titles.

val pages = PagesService.search(name = "Development", langCode = "en_US")

Swift

For convenience, the service has been moved to a separate variable.

let service = PagesService.shared

Get all pages

let pages = try await service.pages(langCode: "en_US")

Hierarchy

OneEntry CMS has a mechanism of page nesting, which allows creating groups and content hierarchy.

Get all top-level pages

Top-level pages are pages that do not have a parent (parentId = null).

let pages = try await service.root(langCode: "en_US")

Get all child pages

Child pages are pages that are not the first in the hierarchy (parentId ≠ null). To retrieve them, you need to know the parent's url.

let children = try await service.children(url: "dev", langCode: "en_US")

Get a page

Each page object has its identifier (id) and link (url). With them, you can get an object with all the necessary information.

By identifier

let page = try await service.page(id: 8, langCode: "en_US")

By link

let page = try await service.page(url: "dev", langCode: "en_US")

Get blocks attached to the page

Blocks attached to the page can be obtained by knowing its url.

let blocks = try await service.blocks(url: "dev", langCode: "en_US")

Get page configuration

Page configuration is customized in CMS and mainly contains pagination information.

let config = try await service.config(url: "dev")

Search pages

Pages can be found by knowing their titles.

let pages = try await service.search(name: "Development", langCode: "en_US")
Last modified: 18 February 2025