readMoreActionData
Sets or gets the data object of the read more action for the collapsible text.
Description
Setting the readMoreActionData
property sets the data object of the read more action for
the collapsible text. When a site visitor wants to read more, the collapsible text
can handle the remaining text in 2 ways, 'ExpandOnCurrentPage'
or 'LinkToContent'
, defined in the readMoreActionType
property.
For each readMoreActionType
there is a readMoreActionData
property. The readMoreActionData
property contains a data object which allows you to define the relevant settings for the selected readMoreActionType
.
Set the following data object values for the readMoreActionType
you selected:
ExpandOnCurrentPage
readMoreButtonText
: Text of the read more button.readLessButtonText
: Text of the read less button.collapsed
: Whether the collapsible text is currently collapsed.
LinkToContent
link
: Required. Link for the remaining content. Supports all link types.target
: Determines where the link opens.readMoreButtonVisible
: Whether the read more button is visible. Iftrue
, the button links to the remaining content link. Iffalse
, the introductory text links to the remaining content link. Defaults tofalse
.readMoreButtonText
: Text of the read more button.
Note: If the
readMoreActionType
is'LinkToContent'
, you must set thelink
in theLinkToContent
object.
Getting the readMoreActionData
property gets the data object of the read more action for
the collapsible text. Get the data object relevant for the selected readMoreActionType
.
Type:
|
LinkToContentExpandOnCurrentPage
LinkToContent
NAME
TYPE
DESCRIPTION
Text of the read more button. Defaults to Read more
.
Text of the read less button. Defaults to Read less
.
Whether the collapsible text is currently collapsed. Defaults to true
.
Was this helpful?
readMoreActionData
when readMoreActionType
is ExpandOnCurrentPage
1const myReadMoreActionData = $w('#myCollapsibleText').readMoreActionData;23/*4 * {5 * readMoreButtonText: 'Click here for more',6 * readLessButtonText: 'Show Less',7 * collapsed: true8 * }9 */
readMoreActionData
when readMoreActionType
is ExpandOnCurrentPage
1$w('#myCollapsibleText').readMoreActionData = {2 readMoreButtonText: 'Click here for more',3 readLessButtonText: 'Show Less',4 collapsed: false5};
readMoreActionData
when readMoreActionType
is LinkToContent
1const myReadMoreActionData = $w('#myCollapsibleText').readMoreActionData;23/*4 * {5 * link: 'www.myContentOverflow.com',6 * target: '_blank',7 * readMoreButtonVisible: false,8 * readMoreButtonText: ''9 * }10 */
readMoreActionData
when readMoreActionType
is LinkToContent
1$w('#myCollapsibleText').readMoreActionData = {2 link: 'www.myContentOverflow.com',3 target: '_self',4 readMoreButtonVisible: true,5 readMoreButtonText: 'Click here for more'6};