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.urlpage.idpage.title
space.keyspace.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):

LetterDate or Time ComponentPresentationExamples
GEra designatorTextAD
yYearYear1996; 96
MMonth in yearMonthJuly; Jul; 07
wWeek in yearNumber27
WWeek in monthNumber2
DDay in yearNumber189
dDay in monthNumber10
FDay of week in the monthNumber2
EDay in weekTextTuesday; Tue
aAm/pm markerTextPM
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 hourNumber30
sSecond in minuteNumber55
SMillisecondNumber978
zTime zoneGeneral time zonePacific Standard Time; PST; GMT-08:00
ZTime zoneRFC 822 time zone-0800

For more information, click here.

Search documentation

Start typing to search the docs.