Field Renderers
The connector implements custom field renderers.
By doing this we minimize the required effort when implementing the connector in existing solutions.
There is no special syntax required. You can simply use the field renderer syntax that is standard for Sitecore:
<!-- Rendering for a "Image [DAM, Single asset]", "Image [DAM, Multi asset]"
and "General Link [DAM]" field -->
@Html.Sitecore().Field("Field Name Here")
The field renderer for Image fields accepts parameters for resizing:
<!-- Resize to 500 pixels width -->
@Html.Sitecore().Field("Field Name Here", new { width = 500, crop = false })
<!-- Resize to 500 pixels height -->
@Html.Sitecore().Field("Field Name Here", new { height = 500, crop = false })
<!-- Resize to 500x500 pixels with cropping -->
@Html.Sitecore().Field("Field Name Here", new { width = 500, height = 500, crop = false })
If your solution does not use field renderers or requires additional logic to retrieve field values, you may want to use the Extension Methods that the connector provides.
Last updated on December 13, 2022