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
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 vote
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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,921 views 27 12
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