Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

DAM for Sitecore is constructed using pipelines, and it is possible to hook into the pipelines.

Note: Be aware that if you do change the pipelines, you are changing how DAM for Sitecore is supposed to work out of the box, and this may result in undesirable side effects.

The pipelines are defined in the .config files found in this folder: \ App_Config \Include \damforsitecore→ damforsitecore → DFS.Pipelines.config

Below are descriptions of the most important pipelines used in the module.

App_Config/Include/damforsitecore/DFS.Pipelines.config

Pipeline

Description

PipelineArgs

DFS.GetAssetFieldValue

This pipeline will return rendering html for an asset item. 

  1. First it will get the html template, determined by the media type and the fieldId (HtmlForAssetType). The html templates are located at:
    Sitecore → System → Modules → Digizuite → MedaDataRoot → AssetTypeOutputRoot.

  2. The different processors will replace the stampvalue in the html template.

  3. The property FieldValue of GetAssetFieldValueArgs will contain the rendering html.


List of processors

  • DFS.

ContentSearch
  • Client.Services.Pipelines.GetAssetFieldValue.GetAssetTypeOutput

  • DFS.Client.Services.Pipelines.GetAssetFieldValue.ReplaceTagsWithSelectedValues

  • DFS.Client.Services.Pipelines.GetAssetFieldValue.ReplaceTagsWithAccessValues

  • DFS.Client.Services.Pipelines.GetAssetFieldValue.ReplaceTagsWithConfigValues

  • DFS.Client.Services.Pipelines.GetAssetFieldValue.

ReplaceTagsWithAssetItemFieldValues
  • AppendTagsWithParameterValues

  • DFS.Client.

ContentSearch
  • Services.Pipelines.GetAssetFieldValue.ReplaceTagsWithAssetIndexValues

  • DFS.

Pipelines
  • Client.

GetAssetFieldValue
  • Services.

RemoveEmptyAttributesDFS.
  • Pipelines.GetAssetFieldValue.

AppendTagsWithParameterValues
  • RemoveEmptyAttributes

  • DFS.

ContentSearch.Pipelines.GetAssetFieldValue.AppendSeoDFS
  • Client.Services.Pipelines.GetAssetFieldValue.SplitFieldValueIntoResult


Code Block
languagec#
var renderArgs = new GetAssetFieldValueArgs
{
	AssetItemId = new ID(this.AssetItemId),
	ContextLanguage = Context.Language,
	FieldId = DFS.Fields.HtmlForAssetType.FieldAssetMedia,
	Quality = this.Quality
};



Pipeline

Description

PipelineArgs

DFS.Services.DFSMedia

This pipeline will return the media stream either from the cache or from Digizuite DAM. 

  1. First we check security.

  2. If the media is in the cache we return that.

  3. The media was not in the cache, fetch the media from Digizuite DAM.

  4. We resize the image, if resizing parameters was added.

  5. Store the media in the cache.


List of processors

  • DFS.Client.Services.Pipelines.DFSMedia.

FetchAsset
  • SynchronizeAsset (Only In Role: ContentManagement)

  • DFS.Client.Services.Pipelines.DFSMedia.LoadAssetEntity

  • DFS.Client.Services.Pipelines.DFSMedia.GetMediaFromCache

  • DFS.Client.Services.Pipelines.DFSMedia.GetMediaFromDigizuite

  • DFS.Client.Services.Pipelines.DFSMedia.ResizeImage

  • DFS.Client.Services.Pipelines.DFSMedia.SaveToCache

  • DFS.Client.Services.Pipelines.DFSMedia.

ResolveDownloadFilename
  • ResolveFilename


Code Block
languagec#
var arguments = new DFSMediaPipelineArgs
{
	Request = mediaRequest,
    Result = new MediaResult()
};



Synchronization