Show / Hide Table of Contents

Class SitecoreFieldExtensions

Set of extension methods for Sitecore fields.

Inheritance
System.Object
SitecoreFieldExtensions
Namespace: Sitecore.AspNet.RenderingEngine.Extensions
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
public static class SitecoreFieldExtensions : Object

Methods

GetMediaLink(ImageField, Object)

Gets modified URL string to Sitecore media item.

Declaration
public static string GetMediaLink(this ImageField imageField, object imageParams)
Parameters
Type Name Description
ImageField imageField

The image field.

System.Object imageParams

Image parameters, example: new { mw = 100, mh = 50 }. IMPORTANT: All the parameters you pass must be whitelisted for resizing to occur. See /sitecore/config/*.config (search for 'allowedMediaParams').

Returns
Type Description
System.String

Media item URL.

Back to top Generated by DocFX