It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I need to find the author/last modifier of a page from the 'atlassian-plugin.xml' file in a plugin

Matt Albone Jan 08, 2013

Hello

Within a web-item in a confluence plugin i have been able to pass down a pages ID number using the following:

<web-item key="outofdate" name="outofdate" section="system.content.button" weight="40">

<context-provider class="com.dneg.menu.menuoptions.MenuOptionsHelper"/>

<label>$oTitle</label>

<link>/plugins/menuoptions/menuoptions.action?json={id:$page.id,flag:outofdate,status:$outofdate}</link>

<icon height="16" width="16">

<link>$oIcon</link>

</icon>

<conditions type="AND">

<condition class="com.atlassian.confluence.plugin.descriptor.web.conditions.NotPersonalSpaceCondition/">

<condition class="com.atlassian.confluence.plugin.descriptor.web.conditions.CanEditSpaceStylesCondition/">

</conditions>

</web-item>

The '$page.id' parameter allowed me to access the page ID and pass it down to the plugin, I was hoping there is a list somewhere of all the possible attributes that can be put in this link tag in a web-item. I know there's others such as '$space.key', and i've seen a few oher examples, what I'm really after is something to give me the author or last modifier of the page in question though.

Thanks in advance

Matt

1 answer

1 accepted

0 votes
Answer accepted
Matt Albone Jan 14, 2013

I still have no idea where the documentation for this is, i ended up using a workaround.

I brought in the page ID as shown above, then used:

Page p = pageManager.getPage(Long.parseLong(pageID));    
auth = p.getCreatorName() + "@dneg.com";
lastMod = p.getLastModifierName() + "@dneg.com";

Works just as well! =]

Joe Clark Atlassian Team Jan 30, 2013

That's a fine way to do it. :)

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

1,098 views 13 15
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you