This documentation has moved. For the most recent documentation, check out https://docs.adaptavist.com. Please update your bookmarks and links.

Skip to end of metadata
Go to start of metadata

ThemeBuilder Macro - Panel Info (Builder Info)

panel-info

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

Categories: development

Usage

Storage Format

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

Wiki Markup

{panel-info:parameter=value}

 

 

Parameter

Name

Description

Type

Default

Required

type

Type

The piece of information required

enum

 

(tick)

dateformat

Date Format

The format to use with dates

string

 

(error)

flag

Flag

A list of flags, one of which must be defined for the content to be displayed

string

 

(error)

notflag

Not Flag

A list of flags which must not be defined for the content to be displayed

string

 

(error)

 

Type Parameter Options

  • current.username
  • current.fullname
  • current.firstname
  • current.lastname
  • profile.username
  • profile.fullname
  • profile.firstname
  • profile.lastname
  • creator.username
  • creator.fullname
  • creator.firstname
  • creator.lastname
  • creator.date
  • lastmodified.username
  • lastmodified.fullname
  • lastmodified.firstname
  • lastmodified.lastname
  • lastmodified.date
  • page.url
  • page.id
  • page.title
  • space.key
  • space.name
  • space.description
  • site.name
  • site.baseurl
  • site.homepage
  • site.contextpath
  • today.date

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. "''" represents a single quote. 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 from '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 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

See http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html for more information