Core models overview
The SDL Digital Experience Accelerator core models provide options for semantic mapping of, for example, Links, Keywords, Paragraphs and content blocks, geo location, and media items. Browse through the model classes to get a feel for the flexibility provided by semantic mapping and read the documentation in this section te get an overview of the functionality.
- for .NET:
Sdl.Web.Common.Models - for Java:
com.sdl.webapp.common.api.model
Links
Link class and use the following properties:
UrlLinkTextAlternateText
The class also has semantics applied to it to ensure that it is automatically mapped correctly if your Content Manager Schemas use the Link Embedded Schema to define links. You can use this Schema to create internal links (links to Components in the Content Manager) or external links.
Keywords
If you use Keywords in your content model, by default your View Model property is populated with the Keyword title. To add information such as Keyword description, ID/key, or category, use the Tag class which provides:
DisplayText—the keyword description (or title if there is no description)Key—the keyword key (or URI if there is no key)TagCategory—the taxonomy URI
Paragraphs and content blocks
Paragraph class to represent a list of content blocks containing:
- Subheading
- Content
- Media (see
MediaItembelow) - Caption
Geo location
Location class which provides:
- Longitude
- Latitude
- Query (a free text field used to identify content on a map using a query string such as an address rather than exact co-ordinates)
Media items
Image—if your media item is an imageDownload—if your media item is a downloadable fileYouTubeVideo—if your media item is a link to a YouTube videoMediaItem—if your media item can be any one of the above