OneEntry Platform 2.0.1 Help

Preview Templates

Preview templates allow you to configure the image parameters used in attributes. By applying a template to an attribute of type "Image" or "Image Group," you will get images standardized according to the specifications in the preview template. This is convenient if the design of your project is sensitive to image sizes. By configuring the preview template, you can change the image parameters that the end user will see.

Kotlin Multiplatform

Getting all templates

val templates = TemplatesService.previewsTemplates()

Getting a template

By identifier

val template = TemplatesService.previewsTemplate(id = 10)

By marker

val template = TemplatesService.previewsTemplate(marker = "circle_card")

Swift

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

let service = TemplatesService.shared

Getting all templates

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

Getting a template

By identifier

let template = try await service.previewsTemplate(id: 10, langCode: "en_US")

By marker

let template = try await service.previewsTemplate(marker: "circle_card", langCode: "en_US")
Last modified: 18 February 2025