Extension Methods
Content Extensions
Get Multiple Media Items
/// <summary>
/// Retrieves a list of media items from a content property.
/// </summary>
/// <param name="content">The content item that holds the media property.</param>
/// <param name="alias">The alias of the media property to fetch.</param>
/// <param name="mediaService">The media service to query.</param>
/// <param name="fallBackUrl">A fallback URL to use if no media is found.</param>
/// <returns>List of media items if found; otherwise, a list containing a single media item with the fallback URL.</returns>
public static async Task<List<Media.Models.Media>> GetMediaItems(
this IHasPropertyValues content,
string? alias,
IMediaService mediaService,
string? fallBackUrl = null)Get Single Media Item
Get Multiple Content Items
Get Single Content Item
Get Content Blocks
Get Multiple Users
Get Single User
Service Extensions
Get Global Settings
Save Global Settings
Get Global Data (Generic)
Get Current User
Get User by ID (Shorthand)
Get Media by ID (Shorthand)
Get Content by ID (Shorthand)
Complete Example
Last updated