Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Restrict list of content created by a user to content-type page

Anne EQS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 20, 2015

I'd like to give each of our users to give a list of the pages created - only the pages, not comments, attachments etc.
User macro for the display of all content works, but how restrict it to content-type page?

 

## Macro title: Content by current user
## Body Processing: Escaped

<ac:structured-macro ac:name="content-by-user">
<ac:parameter ac:name="">
<ri:user ri:userkey="${action.authenticatedUser.key}"/>
</ac:parameter>
</ac:structured-macro>

2 answers

1 accepted

1 vote
Answer accepted
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2015

This should work:

## Macro title: Pages by current user
## Body Processing: Escaped
&lt;ac:structured-macro ac:name="content-by-user"&gt;
  &lt;ac:parameter ac:name=""&gt;
    &lt;ri:user ri:userkey="${action.authenticatedUser.key}"/&gt;
  &lt;/ac:parameter&gt;
&lt;/ac:structured-macro&gt;
&lt;script&gt;
  AJS.toInit(function() {
    jQuery(".grid").find("span.icon:not([title*='age'])").parent().hide();
  });
&lt;/script&gt;

There will be a few empty spaces, but that can't be helped; since Confluence doesn't support filtering by type, you have to use some javascript magic to filter the results to show only pages.

0 votes
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2015

Hi Anne, sorry I saw your question earlier, but didn't get a chance to respond. Give me a little bit of time an I'll update the macro.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events