ArticleRenderer Class
Retrieves the necessary data as well as prepares the layout so a view loader can complete the render of content
Constructor
ArticleRenderer
-
context
Parameters:
-
context
Object-
hostname
String -
site
String -
onlyThisSite
Boolean -
[userService]
UserService optional
-
Item Index
Methods
Properties
Methods
containsReadMoreFlag
-
content
Parameters:
-
content
Object
Returns:
formatAutoBreak
-
content
-
context
Parameters:
-
content
Object -
context
Object
formatBylines
-
content
-
context
Parameters:
-
content
Object -
context
Object
formatComments
-
content
-
context
-
cb
Parameters:
-
content
Object -
context
Object -
cb
Function
formatLayout
-
content
-
context
Parameters:
-
content
Object -
context
Object
formatLayoutForReadMore
-
content
-
context
Parameters:
-
content
Object -
context
Object-
readMore
Boolean
-
formatMediaReferences
-
content
-
context
-
cb
Parameters:
-
content
Object -
context
Object -
cb
Function
formatTimestamp
-
content
-
context
Parameters:
-
content
Object -
context
Object
getCommenters
-
comments
-
contentSettings
-
cb
Retrieves the commenters for an array of comments
Parameters:
-
comments
ArrayArray of comment objects
-
contentSettings
ObjectContent settings to use for processing
-
cb
FunctionCallback function
getContentLinkPrefix
()
String
Returns:
getLayout
-
content
Retrieves the layout from the content object. Provides a mechanism to allow for layout parameter to have any name.
Parameters:
-
content
Object
Returns:
getReadMoreLink
-
content
-
anchorContent
Parameters:
-
content
Object -
anchorContent
String
Returns:
getReadMoreSpan
-
content
-
anchorContent
Parameters:
-
content
Object -
anchorContent
String
Returns:
render
-
content
-
context
-
cb
Parameters:
-
content
Object -
context
Object-
[authors]
Object optionalA hash of user objects representing the authors of the content to be rendered
-
contentSettings
ObjectThe content settings
-
contentCount
IntegerAn integer representing the total number of content objects that will be processed for this request
-
[renderBylines=true]
Boolean optional -
[renderTimestamp=true]
Boolean optional -
[renderComments=true]
Boolean optional -
[readMore=false]
Boolean optional
-
-
cb
Function
setLayout
-
content
-
layout
A workaround to allow this prototype to operate on articles and pages. The layout parameter is not the same. Until we introduce breaking changes this will have to do.
Parameters:
-
content
Object -
layout
String
Properties
ANONYMOUS_COMMENTER
String
private
static
hostname
String
onlyThisSite
Boolean
READ_MORE_FLAG
String
private
static
site
String
userService
UserService
Instance of user service. No context is provided and therefore can only be used