Skip to main content

Properties

Remarks

Example

C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using Zengenti.Contensis.Delivery; // Create an API client var client = ContensisClient.Create(); // Retrieve a movie by it's ID. var movie = client.Entries.Get("0aabad4e-a083-4a88-bd75-b2674e2f8298"); // Get the field value as an Image instance. var coverImage = movie.Get<Image>("posterImage"); // Get properties of the Image instance. var imgWidth = coverImage.Asset.Properties["width"]; var imgHeight = coverImage.Asset.Properties["height"]; var altText = coverImage.Asset.Get("altText"); // The altText set from Contensis. // Get properties of the image set on the entry. var caption = coverImage.Caption; var altText = coverImage.AltText; <figure> <img src="@coverImage.Asset.Uri" alt="@coverImage.AltText" width="@imgWidth" height="@imgHeight"> <figcaption>@coverImage.Caption</figcaption> </figure>

Still need help?

New support request