The Adaptavist Group LogoDocumentation

Panel Info

This macro extracts individual pieces of information from Confluence that can be used in ThemeBuilder skins or on a page.

Storage Format

<ac:macro ac:name="panel-info">
<ac:parameter ac:name="parameter">value</ac:parameter>
</ac:macro>

Wiki Markup

{panel-info:parameter=value}
ParameterNameDescriptionTypeDefaultRequired
typeTypeThe piece of information requiredenum
dateformatDate FormatThe format to use with datesstring
flagFlagA list of flags, one of which must be defined for the content to be displayedstring
notflagNot FlagA list of flags that must not be defined for the content to be displayedstring

Type Parameter Options

current.usernamecurrent.fullnamecurrent.firstname
current.lastnameprofile.usernameprofile.fullname
profile.firstnameprofile.lastnamecreator.username
creator.fullnamecreator.firstnamecreator.lastname
creator.datelastmodified.usernamelastmodified.fullname
lastmodified.firstnamelastmodified.lastnamelastmodified.date
page.url page.idpage.title
space.key space.namespace.description
site.namesite.baseurlsite.homepage

Basic Example

Display a welcome message using the current user's full name.

Add the following code just before the Confluence welcome message:

<h2>Welcome <ac:macro ac:name="panel-info">
<ac:parameter ac:name="type">current.fullname</ac:parameter>
</ac:macro></h2>

Result

Advanced Example

Display today's date in Day Name - Day Date - Month Name - Year format.

<p>Today is
<ac:macro ac:name="panel-info">
<ac:parameter ac:name="type">today.date</ac:parameter>
<ac:parameter ac:name="dateformat">EEEE dd MMM yyyy</ac:parameter>
</ac:macro>
</p>

Result

(as an image - not live)

Resources

Date and Time Patterns

Date and time formats are specified by date and time pattern strings. Within date and time pattern strings, unquoted letters from 'A' to 'Z' and from 'a' to 'z' are interpreted as pattern letters representing the components of a date or time string. Text can be quoted using single quotes (') to avoid interpretation. All other characters are not interpreted; they're simply copied into the output string during formatting or matched against the input string during parsing.

The following pattern letters are defined (all other characters from 'A' to 'Z' and 'a' to 'z' are reserved):

Letter Date or Time Component Presentation Examples
GEra designator TextAD
yYear Year1996; 96
MMonth in year MonthJuly; Jul; 07
wWeek in year Number27
WWeek in month Number2
DDay in year Number189
dDay in month Number10
FDay of week in the month Number2
EDay in week TextTuesday; Tue
aAm/pm marker TextPM
HHour in day (0-23) Number0
kHour in day (1-24) Number24
KHour in am/pm (0-11) Number0
hHour in am/pm (1-12) Number12
mMinute in hour Number30
sSecond in minute Number55
SMillisecond Number978
zTime zone General time zonePacific Standard Time; PST; GMT-08:00
ZTime zone RFC 822 time zone-0800

For more information, click here.

Search documentation

Start typing to search the docs.