Class: Fragments:DocumentLink

Fragments:DocumentLink

Embodies a document link fragment (a link that is internal to a prismic.io repository)
Source:

Members

fragments

the fragment list, if the fetchLinks parameter was used in at query time
Source:

id

the linked document id
Source:

isBroken

true if the link is broken, false otherwise
Source:

lang

the linked document language
Source:

slug

the linked document slug
Source:

tags

the linked document tags
Source:

type

the linked document type
Source:

uid

the linked document uid
Source:

Methods

asHtml() → {string}

Turns the fragment into a useable HTML version of it. If the native HTML code doesn't suit your design, this function is meant to be overriden.
Source:
Returns:
- basic HTML code for the fragment
Type
string

asText() → {string}

Turns the fragment into a useable text version of it.
Source:
Returns:
- basic text version of the fragment
Type
string

url() → {string}

Returns the URL of the document link.
Source:
Returns:
- the proper URL to use
Type
string