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

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
Accepted answer
Stephen Deutsch Community Champion Sep 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 Community Champion Sep 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
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,547 views 25 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you