Versions Compared

Key

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


Syntax

Description

Excerpttable-plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
columnAttributesstyle="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold,
enableSortingfalse

Syntax

getAllCommentIds(pageId)

Package

Alias

Pkg Usage

Description

Excerpt
hiddentrue

Gets all the comment IDs that are already entered on a page.

Gets all the comment

...

IDs that are already entered on

...

a page.

Parameters

Table plus
applyColStyleToCelltrue
columnTypess,s,s,s
heading0
multiplefalse
enableSortingfalse

Parameter name

Type

Required

Description

...

Return type

...

page ID

Number

Yes

ID of the selected page.

Return Type

Number []

IDs of the comments on the page.

Examples

Example 1

Print Page has 12 comments for example.

Code Block
languagejs
number [] allComm = getAllCommentIds(11801);
print("Page has " + size(allComm) + " comments";

Example 2

Deletes all comments older than 1 year from page ID 11801.

Code Block
languagejs
number [] allComm = getAllCommentIds(11801);
interval year = "365d";

for(number c in allComm) {
	CComment comm = getCommentById(c);
	if(comm.created < (currentDate - year)) {
		deleteComment(c)
	}
}

See also

Filter by label (Content by label)
showLabelsfalse
max25
showSpacefalse
cqllabel = "

...

comment_

...

routines" and space = currentSpace ( )
labels

...

array_

...

routines