{table:class=c-layout} {tr} {td:class=c-features} {move-target:custom-sidebar} {builder-hide:flag=hide-default-sidebar} {sorted-children:page=@root} {builder-hide} {td} {td:class=c-content}h2. {builder-pagetitle} {align:center}{div:class=toctable}{toc:minLevel=3|maxLevel=3|type=flat}{div}{align} {section} {column:width=92%} {align:center} {html} <br /> {html} !pageInformationPlugin_medium.png|align=center! {align} {column} {column:width=8%} {html} <br /> <a href="http://www.adaptavist.com/display/Plugins/Try+or+Buy" border="0"><img src="http://www.adaptavist.com/download/attachments/36012320/freeTrial.png" alt="Our plugins can be trialled for free, no credit card details required" /> <br /><br /> <a href="http://twitter.com/weloveplugins" target="_new" border="0"><img src="http://www.adaptavist.com/download/attachments/36012320/followPlugins.png" alt="For updates on Plugins, follow @weloveplugins" /> <br /><br /> <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.adaptavist.com/display/Plugins/Page+Information" data-text="Check out the Page Information plugin for Atlassian's #Confluence by @adaptavist" data-count="vertical" data-via="weloveplugins">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.adaptavist.com/display/Plugins/Page+Information&layout=box_count&show_faces=false&width=50&action=like&font=arial&colorscheme=light&height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:65px; position: relative; top: 4px;" allowTransparency="true"></iframe> </a> {html}{column} {section} \\ *The Page Information Tools plugin allows you to display the various bits of information about pages and blog posts in Confluence that are usually hidden away. By combining macros together, you can show things like who created the page and when or the current version number and date it was last modified.*
*It's particularly useful when working with custom themes, like Theme Builder, or formal documentation.* {section} {column:width=40%} h3. Plugin Pack *This plugin is part of the [Essentials Pack|http://www.adaptavist.com/pages/viewpage.action?pageId=54559258#Packs%26Pricing-EssentialsPack]* {column} {column:width=40%} h3. Compatibility *This plugin is compatible with Confluence v3.1-3.5* {column} {column:width=5%} {column} {column:width=15%} h3. Download [Latest v1.3.4|https://plugins.atlassian.com/server/1.0/download/pluginVersion/42263] {column} {section}
h3. Features & Benefits {section} {column:width=20%} \\ {column} {column:width=2%} {column} {column:width=78%} With Page Information Tools, you can display: * Author(s) - Display the name of the page author and/or editors * Commenters - List everyone who has commented on a page * Participants - List everyone who's been involved with a page * Dates - Display dates of creation, last edit etc. * Versions - Current version, all versions, revision tables * Diffs - Display links to the changes between versions * Title & ID - Display the page title and content ID * Tiny URL - Display the hyperlinked TinyURL for a page * Labels - Show a list of all labels associated with a page {column} {section}
h4. Parameters ||Parameter||Default||Required||Notes|| ||_default_| |(/)|The default *"displaytype"* parameter is the name of the piece of information you wish to see displayed, this may be one of the following: * *created-user* - displays the user who created the page * *created-date* - displays the date the page was created * *modified-user* - displays the user who last modified the page * *modified-users* - displays a comma separated list of all the users who have modified the page * *modified-date* - displays the date the page was last modified * *participants* - displays a comma separated list of the users who have modified or commented on the page * *commenters* - displays a comma separated list of the users who have commented on the page * *current-version* - displays the most recent version number for the page * *versions* - displays a comma separated list of version numbers, clickable to take you to view that version * *diffs* - displays a comma separated list of version numbers, clickable to take you to view the differences between that version and the next version * *labels* - displays a comma separated list of labels, clickable to allow you to view other pages which posess that label * *tinyurl* - displays a tinyurl link to the specified page * *title* - displays the title of the specified page
* *pageId* - displays the Id of the current page| ||page|_current page_|(x)|The name of the page whose information you wish to display, if none is given then the current page is assumed. You can also use {{@self}} to refer to the current page and {{@parent}} to use the parent page.|
||dateFormat|_Default Date Format_|(x)|Allows setting the display format for the date and time displayed, when do datno date is to be displayed this parameter has no effect. Details of the pattern syntax may be found [Date Formats].|
||type|flat|(x)|For those display types that produce a list of information, you can specify: * *flat* - display a comma separeated list (default)
...
* *list* - display a bullet list| ||prefix| |(x)|When displaying a version numbers you may use this parameter to insert a prefix before the version number. Has no effect with those display types which do not display a version number.| ||reverse|false|(x)|When displaying a list of items, you can set this parameter to _true_ to reverse the order of those items.| ||count|_show all_|(x)|If you want to limit the number of items shown in a list (eg. versions and diffs) define the number of items to be shown with this parameter.| || showComments | false | (x) | Display the comments that accompany an update. | || showVersions | true | (x) | Display the version numbers. |
Add the macro to your page as follows: {noformat}{version-history:page=Home|dateFormat:ddMMYY HHmm|reverse=true|first=5}{noformat}
||Parameter||Required||Notes|| ||page|(x)|The name of the page whose version history you wish to display, if none is given then the current page is assumed. (@self and @parent are also valid)| ||dateFormat|(x)|Allows you to override the format used to display dates. Details of the pattern syntax may be found [Date Formats]. If omitted, the date format defined in Confluence General Configuration will be used.| ||reverse|(x)|Whether to reverse the list (sorted in revision order)| ||first|(x)|Only display the first _x_ entries|
h3. Recipes {expand:Displaying the current page's author} {quote} {noformat}{page-info:created-user}{noformat}
Which looks like: {page-info:created-user} {quote} {expand}
{expand:Displaying the current page's creation date} {quote} {noformat}{page-info:created-date}{noformat}
Which looks like: {page-info:created-date} {quote} {expand}
{expand:Displaying author and date} {quote} {noformat}This page was created by {page-info:created-user} on {page-info:created-date}{noformat}
Which looks like: This page was created by {page-info:created-user} on {page-info:created-date} {quote} {expand}
{expand:Displaying the name of the person who last modified the current page}
Which looks like: {page-info:modified-user} {quote} {expand}
{expand:Displaying the date that the current page was last modified} {quote} {noformat}{page-info:modified-date}{noformat}
Which looks like: {page-info:modified-date} {quote} {expand}
{expand:Displaying last modifier and modification date} {quote} {noformat}This page was modified by {page-info:modified-user} on {page-info:modified-date}{noformat}
Which looks like: This page was modified by {page-info:modified-user} on {page-info:modified-date} {quote} {expand}
{expand:Formatting dates} {quote} By default, dates and times are shown using the format defined in Confluence's [General Configuration]. However, you can alter this format by using the [Date Formats] syntax as shown in some of the examples below:
{expand:Listing users that have commented on a page} {quote} You can generate a list showing only the commentors as follows (both formats shown):
{noformat} Comments made by: {page-info:commenters} {page-info:commenters|type=list} {noformat}
Resulting in:
Comments made by: {page-info:commenters} {page-info:commenters|type=list} {quote} {expand}
{expand:Listing users that have modified the page} {quote} If you only want to list people who have modified (edited) a page, use the following notation (both formats shown):
{expand:Displaying the current page version} {quote} If for some reason you need to display the version number of the current page, you can do this using the following notation: {noformat} This page is at version {page-info:current-version}! {noformat}
Resulting in:
This page is at version {page-info:current-version}! {quote} {expand}
{expand:Listing the versions of the page} {quote} Possibly more useful is to be able to display a list of the versions that a page has gone through: {noformat} {page-info:versions} {noformat}
Which generates a comma separated list as can be seen below: {page-info:versions} {quote} {expand}
{expand:Reversing list order and limiting number of items} {quote} You can reverse the order of any list with the reverse parameter: {noformat} {page-info:versions|reverse=true} {noformat}
Which gives a reversed list (compare to previous example): {page-info:versions|reverse=true}
This is particularly useful when you want to limit the number of items shown as you can then show the last 5 versions for example:
{expand:Displaying "diff" links} {quote} You can create a list of page versions which, when clicked, will show the differences between that version and the next version:
{noformat} {page-info:diffs} {noformat}
Which gives:
{page-info:diffs} {quote} {expand}
{expand:Displaying "Tiny URL" for a page} {quote} The "Tiny URL" is a shortened URL for the current page that's useful if you're sending the link in emails, etc.
{expand:Displaying page title} {quote} You can display the title for the current page as follows:
{noformat} {page-info:title} {noformat}
Which gives:
{page-info:title}
If you want the page title to be linked, use the "tinyurl" option (see previous example).
See also: [Builder:builder-pagetitle macro] {quote} {expand}
{expand:Listing the labels on the page} {quote} It may at some time be useful to be able to display a list of all of the labels present on the page, this may be achieved using the labels display type {noformat} {page-info:labels} {noformat}
As seen below {page-info:labels}
Which as ever is available in list mode too {noformat} {page-info:labels|type=list} {noformat}
As seen below {page-info:labels|type=list}
See also: [Builder:builder-labels macro] {quote} {expand}
{expand:Showing information about another page} {quote} On occasion it may also be useful to specify a different page to the current one to be the page whose information is being displayed: {noformat} {page-info:participants|page=Home} {noformat}
{page-info:participants|page=Home}
This page parameter may be set to {{@parent}} which refers to the parent of the current page. For example, you can display a link to the parent page with the "tinyurl" setting like this: {noformat} {page-info:tinyurl|page=@parent} {noformat}
{page-info:tinyurl|page=@parent} {quote} {expand}
{expand:Showing Edits and the accompanying comment} {quote} You can use the showComment parameter to list the comment along with edit like this. {noformat} {page-info:diffs|showComments=true} {noformat}
This will result in output like this: {page-info:diffs|showComments=true}
{quote} {expand}
{expand:Showing Edit Comments without version numbers} {quote} You can use the showComment=true parameter to list the comment and showVersion=false to hide the number like this: {noformat} {page-info:diffs|showComments=true|showVersion=false} {noformat}
This will result in output like this: {page-info:diffs|showComments=true|showVersion=false}
{quote} {expand}
{composition-setup}{composition-setup} {deck:id=Version-history Macro Examples|class=tan} {card:label=Example 1} h4. Displaying the current page's history
{noformat}{version-history}{noformat}
Which produces a table displaying version information about the current page: {version-history}
{card} {card:label=Example 2} h4. Limiting the number of items displayed
On pages that are frequently edited there may be far too many entries in the version history to conveniently display all of them, you can limit the number of entries displayed using the _first_ parameter
{noformat} {version-history:first=3} {noformat}
Which produces a table containing limited to displaying three entries {version-history:first=3}
{card}{card:label=Example 3} h4. Reversing the order of items displayed
By default the versions listed are sorted into oldest to newest version (first revision to most recent revision), often you may wish to reverse this order, especially when using the _first_ parameter since this can give you a list of the most recent changes to a page
{card:label=Example 5} h4. Setting the date format
You may also wish to set the format that the date appears in, this can be done using the _format_ parameter. Details of the syntax for the format definition can be found [Date Formats].
As can be seen below: {version-history:first=3|dateFormat=dd MMMM yyyy, hh.mm aa}
{card} {deck}
h3. Plugin Support The Essentials pack is [supported by the community|Support:Community Support]. The quickest way to get help with this plugin is [on our forums|free:Forum].
You can also [create/view issues for this plugin|https://studio.plugins.atlassian.com/browse/PIN] {jiraissues:anonymous=true|url=https://studio.plugins.atlassian.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+PIN+AND+status+in+%28Open%2C+Reopened%29&tempMax=1000|columns=type;key;summary|width=700px}
Adaptavist are global experts in consultancy, plugin development, training, support services and Enterprise solutions for Atlassian's Confluence, JIRA and Dev Tools.
We're a Platinum Expert whose creations have been included in Confluence itself. With 6 years experience, we've helped over 5000 customers to integrate and collaborate, including over half of the Fortune 50.
Try for Free
You can try our Plugin Packs for free, no credit card required. Then keep the essentials pack for free too!