Javascript for Episerver 7.5 cms

ContentReference

Summary

An object uniquely identifying a CMS content item.

Location

epi-cms/core/ContentReference

Properties

emptyContentReference

id

The id number of an item

isSelfReference

Denotes if the reference is a self reference

providerName

A string that identifies a if an external provider serves the item.

workId

The version id of an item.

Methods

public method _parse ( value )

Parses an object or a string describing a content reference int this object

Parameters

public method createVersionUnspecificReference ( )

Creates a content link that ignores the work id


public method toString ( )

Returns a serialized version of this content reference in the format id[_workId][_providerName]

Examples

Create a content reference from an object with properties

var contentReference = new epi.cms.core.ContentReference({ id:3, workId:4, providerName: ""});

Create a content reference from its serialized string representation

var contentReference = new epi.cms.core.ContentReference("3__providerName");