File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/Umbraco.Cms.Integrations.DAM.Aprimo Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,21 @@ For the selected media asset you can retrieve the crops details using the `Media
83
83
84
84
It contains the details of the original asset, the list of available crops and a method to retrieve the crop URL based on name and width/height.
85
85
86
+ For example:
87
+ - get URL for crop item with the name _ Social_ : ` @Model.MediaWithCrops.GetCropUrl("Social") `
88
+ - get URL for crop item with height _ 1080_ : ` @Model.MediaWithCrops.GetCropUrl(null, 1080) `
89
+
86
90
### Working with fields
87
91
The asset's fields are grouped in an object containing their label and a dictionary of values based on the available cultures for that asset.
92
+
93
+ For example:
94
+ - get values for a field with label _ Display Title_ :
95
+ ```
96
+ var displayTitle = @Model.Fields.FirstOrDefault(p => p.Label == "Display Title");
97
+ var values = displayTitle != null
98
+ ? displayTitle.Values
99
+ : default(Dictionary<string, string>());
100
+ ```
101
+
88
102
### Version history
89
103
- 1.0.0 - Initial release
You can’t perform that action at this time.
0 commit comments