SlideShare a Scribd company logo
Macro Definition                                                 Referencing Confluence Objects
 Macro has a body             Anything the user types within      $body                    The body of the macro
                              the body of the macro will be       $param0-n                The parameters passed to your
                              available in the macro in the                                macro (as available)
                              $body variable.                     $param<name>             Named parameters passed to your
    Use unprocessed           The body of the macro will be                                macro (as available)
    macro body                output exactly as entered,          $config                  The BootstrapManager object,
                              including any HTML markup.                                   useful for retrieving Confluence
                              For example if the macro body is                             properties
                              '<b>body</b>', it will be           $content                 The current ContentEntity object
                              displayed as 'body' in the page.                             that this macro is a included in (if
    Escape HTML in            The body of the macro will be                                available)
    macro body                output with HTML markup             $space                   The Space object that this content
                              escaped. So if the macro body is                             object is located in (if relevant)
                              '<b>body</b>', it will be           $generalUtil             A GeneralUtil object, with useful
                              displayed as '<b>body</b>' in                                utility methods for URL encoding
                              the page.                                                    etc
    Convert macro body        The body of the macro will be       $action                  A blank ConfluenceActionSupport
    wiki markup to HTML       converted from wiki text to                                  object, useful for retrieving i18n
                              HTML markup. So if the macro                                 text if needed
                              body is '*body*', it will be        $webwork                 A VelocityWebWorkUtil object, for
                              displayed as 'body' in the page.                             its htmlEncode() method
 Output - Macro               Choose this if you want to write    $req                     The current HttpServletRequest
 generates HTML markup        your macro with HTML                                         object (if the page is rendered as a
                              elements.                                                    result of an HTTP request)
 Output - Macro               Choose this if you want to write    $res                     The corresponding
 generates wiki markup        your macro with wiki markup.                                 HttpServletResponse object (not
Velocity Markup                                                                            recommended to be played with)
                                                                  $userAccessor            For retrieving users, groups and
 ## Some text                 A comment                                                    checking membership
 #var1                        A variable                          $permissionHelper        For determining user rights
 #set($var1=”abc”)            Setting a variable                 Examples
 #if ($var1 == “abc”)         Simple if-else statement
 …                                                                ${content.id}                  Page id of current page
 #else                                                            [$762573668]                   Markup to create link to
 …                                                                                               page with that id
 #end                                                             $action.getHelper()            Referencing another user
 <a                           Embedding a variable within         .renderConfluenceMacro         macro
 href="viewpage.action?       wiki markup                         ("{anothermacro}")
 pageId=$pageid">$linkb
 ody</a>                                                         Recent Confluence versions & dependencies
 #set($page = "$              Using formal references to refer    Confluence         jQuery                Velocity
 {prefix}ref$pageid")         to a variable within a string       2.8                1.2.3                 1.5
                                                                  2.9                1.2.3                 1.5
jQuery tips
                                                                  2.10               1.2.3                 1.5
Must access as jQuery not $                                       3.0                1.2.6                 1.6.1
                                                                  3.1                1.3.2                 1.6.1
<script type="text/javascript">
jQuery(document).ready(function()                                 3.2                1.3.2                 1.6.1
{
   jQuery calls here
});
</script>

References
Confluence manual: Working with macros                           http://confluence.atlassian.com/x/eyAC
Confluence development: User macros                              http://confluence.atlassian.com/x/hRE
Confluence Shared user macro library                             http://confluence.atlassian.com/x/KoCjAg
Confluence objects accessible from Velocity                      http://confluence.atlassian.com/x/EBQD
Atlassian Confluence forum                                       http://forums.atlassian.com/forum.jspa?forumID=96
jQuery                                                           http://jquery.com/
Firebug                                                          http://getfirebug.com/
Adaptavist jQuery versions article                               https://www.adaptavist.com/display/jQuery/Versions
Macro 1: Response time

Example usage: {response-time}

Please see this page for full listing: http://confluence.atlassian.com/display/DISC/Response+Time


Macro 2: color-table (final version)

Example usage: {color-table:A2C1D5|BFEBEF}

## Macro name: color-table
## Macro has a body: N
## Body format: n/a
## Output: HTML
##
## Developed by: Charles Hall
## Developed for: All users
## Date created: 23/02/2010
## Installed by: Charles Hall

## Apply coloring to alternate rows of any tables with the class of confluenceTable.

#set($oddcolor= $param0)
#set($evencolor= $param1)

## Check for valid odd color, otherwise use default
#if (!$oddcolor)
 #set ($oddcolor="ffffff")
#end

## Check for valid even color, otherwise use default
#if (!$evencolor)
 #set ($evencolor="ededed")
#end

<script type="text/javascript" defer="defer">
jQuery(document).ready(function()
{
  //colour code odd and even table rows
  jQuery("table.confluenceTable tr:nth-child(odd)").css("background-color", "#$oddcolor");
  jQuery("table.confluenceTable tr:nth-child(even)").css("background-color", "#$evencolor");
});
</script>



Macro 3: watermark (final version)

Example usage: {watermark: logo.gif|no-repeat|1000}
## Macro name: astrium-watermark
## Macro has a body: N
## Body format: n/a
## Output: HTML
##
## Developed by: Charles Hall
## Developed for: Astrium wiki
## Date created: 31/03/2010
## Installed by: Charles Hall

## define a watermark image for the current page

#set($image= $param0)
#set($repeat = $param1)
#set($minheight= $param2 + 'px')

<script type="text/javascript" defer="defer">
jQuery(document).ready(function() {

/*Default theme*/
if (jQuery("#header-menu-bar").length)
{
  jQuery('#content').css('background-image', 'url($config.getBaseUrl()
$content.getAttachmentNamed("$image").getDownloadPath())');
## Add the specified repeat behaviour
#if ($repeat)
  jQuery('#content').css('background-repeat', '$repeat');
#end
## Check for a specified minimum height
#if ($minheight)
  jQuery('#content').css('height', '$minheight');
#end
  jQuery('#content').css('vertical-align', 'top');
}


/*Left nav theme*/
if (jQuery(".sidebar div.leftnav").length)
{
  jQuery('#mainViewPane').css('background-image', 'url($config.getBaseUrl()
$content.getAttachmentNamed("$image").getDownloadPath())');
## Add the specified repeat behaviour
#if ($repeat)
  jQuery('#mainViewPane').css('background-repeat', '$repeat');
#end
## Check for a specified minimum height
#if ($minheight)
  jQuery('#mainViewPane').css('height', '$minheight');
#end
  jQuery('#mainViewPane').css('vertical-align', 'top');
}


/*Clickr theme*/
if (jQuery("#MegaFooter").length)
{
jQuery('#main').css('background-image', 'url($config.getBaseUrl()
$content.getAttachmentNamed("$image").getDownloadPath())');
## Add the specified repeat behaviour
#if ($repeat)
  jQuery('#main').css('background-repeat', '$repeat');
#end
## Check for a specified minimum height
#if ($minheight)
  jQuery('#main').css('height', '$minheight');
#end
  jQuery('#main').css('vertical-align', 'top');
}

});
</script>



Macro 4: draft-watermark

Example usage: {draft-watermark}

## Macro name: draft-watermark
## Macro has a body: N
## Body format: n/a
## Output: HTML
##
## Developed by: Charles Hall
## Developed for: All users
## Date created: 19/04/2010
## Installed by: Charles Hall

## inserts a Draft watermark image for the current page

## N.B. Calls the watermark user macro
## draft.gif must reside in "company" space

#set($url="http://globalcorp.com/confluence/download/attachments/74416134/draft.gif")

$action.getHelper().renderConfluenceMacro("{watermark:$url|no-repeat|1000}")

More Related Content

What's hot

Java web application development
Java web application developmentJava web application development
Java web application development
RitikRathaur
 
Html 5
Html 5Html 5
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
Amazon Web Services
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Jayant Surana
 
Web Design and Development Life Cycle and Technologies
Web Design and Development Life Cycle and TechnologiesWeb Design and Development Life Cycle and Technologies
Web Design and Development Life Cycle and Technologies
Abdul Rahman Sherzad
 
Headless Architecture
Headless ArchitectureHeadless Architecture
Headless Architecture
Amandeep Singh
 
SERVER SIDE PROGRAMMING
SERVER SIDE PROGRAMMINGSERVER SIDE PROGRAMMING
SERVER SIDE PROGRAMMING
Prabu U
 
Client side &amp; Server side Scripting
Client side &amp; Server side Scripting Client side &amp; Server side Scripting
Client side &amp; Server side Scripting
Webtech Learning
 
Intro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS PropertyIntro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS Property
Adam Soucie
 
ORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewBrett Meyer
 
Blazor Full-Stack
Blazor Full-StackBlazor Full-Stack
Blazor Full-Stack
Ed Charbeneau
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentation
Vibhor Grover
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
Sangeeta Ashrit
 
android layouts
android layoutsandroid layouts
android layoutsDeepa Rani
 
Mixing Python and Java
Mixing Python and JavaMixing Python and Java
Mixing Python and Java
Andreas Schreiber
 
Introduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SFIntroduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SF
Amazon Web Services
 
Php(report)
Php(report)Php(report)
Php(report)Yhannah
 

What's hot (20)

Java web application development
Java web application developmentJava web application development
Java web application development
 
Java cheat sheet
Java cheat sheetJava cheat sheet
Java cheat sheet
 
Html 5
Html 5Html 5
Html 5
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQL
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
 
Web Design and Development Life Cycle and Technologies
Web Design and Development Life Cycle and TechnologiesWeb Design and Development Life Cycle and Technologies
Web Design and Development Life Cycle and Technologies
 
Headless Architecture
Headless ArchitectureHeadless Architecture
Headless Architecture
 
SERVER SIDE PROGRAMMING
SERVER SIDE PROGRAMMINGSERVER SIDE PROGRAMMING
SERVER SIDE PROGRAMMING
 
Client side &amp; Server side Scripting
Client side &amp; Server side Scripting Client side &amp; Server side Scripting
Client side &amp; Server side Scripting
 
Intro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS PropertyIntro to Flexbox - A Magical CSS Property
Intro to Flexbox - A Magical CSS Property
 
ORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate Overview
 
Blazor Full-Stack
Blazor Full-StackBlazor Full-Stack
Blazor Full-Stack
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentation
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
android layouts
android layoutsandroid layouts
android layouts
 
Mixing Python and Java
Mixing Python and JavaMixing Python and Java
Mixing Python and Java
 
Introduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SFIntroduction to GraphQL: Mobile Week SF
Introduction to GraphQL: Mobile Week SF
 
Php(report)
Php(report)Php(report)
Php(report)
 

Viewers also liked

User Macros: Making Your Own Improvements to Confluence - Atlassian Summit 2012
User Macros: Making Your Own Improvements to Confluence - Atlassian Summit 2012User Macros: Making Your Own Improvements to Confluence - Atlassian Summit 2012
User Macros: Making Your Own Improvements to Confluence - Atlassian Summit 2012Atlassian
 
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave TaylorAtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave TaylorAtlassian
 
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
Atlassian
 
JavaScript? In MY Confluence? - Atlassian Summit 2012
JavaScript? In MY Confluence? - Atlassian Summit 2012JavaScript? In MY Confluence? - Atlassian Summit 2012
JavaScript? In MY Confluence? - Atlassian Summit 2012Atlassian
 
Building a kick-ass Confluence page in under 10 minutes: The Sequel
Building a kick-ass Confluence page in under 10 minutes: The SequelBuilding a kick-ass Confluence page in under 10 minutes: The Sequel
Building a kick-ass Confluence page in under 10 minutes: The SequelAtlassian
 
A Habit of Innovation
A Habit of InnovationA Habit of Innovation
A Habit of Innovation
Atlassian
 
Optimizing the Confluence User Experience
Optimizing the Confluence User ExperienceOptimizing the Confluence User Experience
Optimizing the Confluence User ExperienceCprime
 
AtlasCamp 2014: Writing Connect Add-ons for Confluence
AtlasCamp 2014: Writing Connect Add-ons for ConfluenceAtlasCamp 2014: Writing Connect Add-ons for Confluence
AtlasCamp 2014: Writing Connect Add-ons for Confluence
Atlassian
 
Build Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and ConfluenceBuild Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and Confluence
K15t
 
Collaborating Across an Enterprise: Quarterly Planning at Twitter with JIRA a...
Collaborating Across an Enterprise: Quarterly Planning at Twitter with JIRA a...Collaborating Across an Enterprise: Quarterly Planning at Twitter with JIRA a...
Collaborating Across an Enterprise: Quarterly Planning at Twitter with JIRA a...
Nicholas Muldoon
 
CIP Do-Gooder Entry
CIP Do-Gooder EntryCIP Do-Gooder Entry
CIP Do-Gooder EntryAtlassian
 
Using HipChat for Work and Fun - Sean Conaty
Using HipChat for Work and Fun - Sean ConatyUsing HipChat for Work and Fun - Sean Conaty
Using HipChat for Work and Fun - Sean Conaty
Atlassian
 
Referencing Autumn 2009
Referencing Autumn 2009Referencing Autumn 2009
Referencing Autumn 2009
Alexander Buchanan
 
A/B Testing – How to Break Things and Fail Fast (Without Breaking Things) - M...
A/B Testing – How to Break Things and Fail Fast (Without Breaking Things) - M...A/B Testing – How to Break Things and Fail Fast (Without Breaking Things) - M...
A/B Testing – How to Break Things and Fail Fast (Without Breaking Things) - M...
Atlassian
 
Maslow's hierarchy of needs
Maslow's hierarchy of needsMaslow's hierarchy of needs
Maslow's hierarchy of needs
Anita Andziak
 
Confluence Insiders Webinar: Four ways every team can collaborate in Confluence
Confluence Insiders Webinar: Four ways every team can collaborate in ConfluenceConfluence Insiders Webinar: Four ways every team can collaborate in Confluence
Confluence Insiders Webinar: Four ways every team can collaborate in Confluence
Atlassian
 
Macro environment
Macro environmentMacro environment
Macro environment
Parth1815
 
How to create 360 images with google street view app
How to create 360 images with google street view app How to create 360 images with google street view app
How to create 360 images with google street view app
proyectoste
 
Agile documentation with Confluence and Sparx Enterprise Architect
Agile documentation with Confluence and Sparx Enterprise ArchitectAgile documentation with Confluence and Sparx Enterprise Architect
Agile documentation with Confluence and Sparx Enterprise Architect
Per Spilling
 
The Big Migration: How Cerner Moved From Confluence 3.5 to 5.8
The Big Migration: How Cerner Moved From Confluence 3.5 to 5.8The Big Migration: How Cerner Moved From Confluence 3.5 to 5.8
The Big Migration: How Cerner Moved From Confluence 3.5 to 5.8
Atlassian
 

Viewers also liked (20)

User Macros: Making Your Own Improvements to Confluence - Atlassian Summit 2012
User Macros: Making Your Own Improvements to Confluence - Atlassian Summit 2012User Macros: Making Your Own Improvements to Confluence - Atlassian Summit 2012
User Macros: Making Your Own Improvements to Confluence - Atlassian Summit 2012
 
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave TaylorAtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
 
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
 
JavaScript? In MY Confluence? - Atlassian Summit 2012
JavaScript? In MY Confluence? - Atlassian Summit 2012JavaScript? In MY Confluence? - Atlassian Summit 2012
JavaScript? In MY Confluence? - Atlassian Summit 2012
 
Building a kick-ass Confluence page in under 10 minutes: The Sequel
Building a kick-ass Confluence page in under 10 minutes: The SequelBuilding a kick-ass Confluence page in under 10 minutes: The Sequel
Building a kick-ass Confluence page in under 10 minutes: The Sequel
 
A Habit of Innovation
A Habit of InnovationA Habit of Innovation
A Habit of Innovation
 
Optimizing the Confluence User Experience
Optimizing the Confluence User ExperienceOptimizing the Confluence User Experience
Optimizing the Confluence User Experience
 
AtlasCamp 2014: Writing Connect Add-ons for Confluence
AtlasCamp 2014: Writing Connect Add-ons for ConfluenceAtlasCamp 2014: Writing Connect Add-ons for Confluence
AtlasCamp 2014: Writing Connect Add-ons for Confluence
 
Build Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and ConfluenceBuild Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and Confluence
 
Collaborating Across an Enterprise: Quarterly Planning at Twitter with JIRA a...
Collaborating Across an Enterprise: Quarterly Planning at Twitter with JIRA a...Collaborating Across an Enterprise: Quarterly Planning at Twitter with JIRA a...
Collaborating Across an Enterprise: Quarterly Planning at Twitter with JIRA a...
 
CIP Do-Gooder Entry
CIP Do-Gooder EntryCIP Do-Gooder Entry
CIP Do-Gooder Entry
 
Using HipChat for Work and Fun - Sean Conaty
Using HipChat for Work and Fun - Sean ConatyUsing HipChat for Work and Fun - Sean Conaty
Using HipChat for Work and Fun - Sean Conaty
 
Referencing Autumn 2009
Referencing Autumn 2009Referencing Autumn 2009
Referencing Autumn 2009
 
A/B Testing – How to Break Things and Fail Fast (Without Breaking Things) - M...
A/B Testing – How to Break Things and Fail Fast (Without Breaking Things) - M...A/B Testing – How to Break Things and Fail Fast (Without Breaking Things) - M...
A/B Testing – How to Break Things and Fail Fast (Without Breaking Things) - M...
 
Maslow's hierarchy of needs
Maslow's hierarchy of needsMaslow's hierarchy of needs
Maslow's hierarchy of needs
 
Confluence Insiders Webinar: Four ways every team can collaborate in Confluence
Confluence Insiders Webinar: Four ways every team can collaborate in ConfluenceConfluence Insiders Webinar: Four ways every team can collaborate in Confluence
Confluence Insiders Webinar: Four ways every team can collaborate in Confluence
 
Macro environment
Macro environmentMacro environment
Macro environment
 
How to create 360 images with google street view app
How to create 360 images with google street view app How to create 360 images with google street view app
How to create 360 images with google street view app
 
Agile documentation with Confluence and Sparx Enterprise Architect
Agile documentation with Confluence and Sparx Enterprise ArchitectAgile documentation with Confluence and Sparx Enterprise Architect
Agile documentation with Confluence and Sparx Enterprise Architect
 
The Big Migration: How Cerner Moved From Confluence 3.5 to 5.8
The Big Migration: How Cerner Moved From Confluence 3.5 to 5.8The Big Migration: How Cerner Moved From Confluence 3.5 to 5.8
The Big Migration: How Cerner Moved From Confluence 3.5 to 5.8
 

Similar to No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian Summit 2010

jQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends ForeverjQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends Forever
stephskardal
 
Rp 6 session 2 naresh bhatia
Rp 6  session 2 naresh bhatiaRp 6  session 2 naresh bhatia
Rp 6 session 2 naresh bhatiasapientindia
 
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPTHSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
AAFREEN SHAIKH
 
웹기반 Ajax개발을 위한 프레임워크 - metaworks3 (메타웍스3)
웹기반 Ajax개발을 위한 프레임워크 - metaworks3 (메타웍스3)웹기반 Ajax개발을 위한 프레임워크 - metaworks3 (메타웍스3)
웹기반 Ajax개발을 위한 프레임워크 - metaworks3 (메타웍스3)uEngine Solutions
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's NewTed Pennings
 
MVC pattern for widgets
MVC pattern for widgetsMVC pattern for widgets
MVC pattern for widgets
Behnam Taraghi
 
Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1Michał Orman
 
Documenting from the Trenches
Documenting from the TrenchesDocumenting from the Trenches
Documenting from the TrenchesXavier Noria
 
Key Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UKKey Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UK
Max Pronko
 
Jquery Basics
Jquery BasicsJquery Basics
Jquery Basics
Umeshwaran V
 
Introduction to JSP
Introduction to JSPIntroduction to JSP
Introduction to JSPGeethu Mohan
 
React on Rails - RailsConf 2017 (Phoenix)
 React on Rails - RailsConf 2017 (Phoenix) React on Rails - RailsConf 2017 (Phoenix)
React on Rails - RailsConf 2017 (Phoenix)
Jo Cranford
 
Lift Framework
Lift FrameworkLift Framework
Lift Framework
Jeffrey Groneberg
 
Web2 - jQuery
Web2 - jQueryWeb2 - jQuery
Web2 - jQuery
voicerepublic
 

Similar to No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian Summit 2010 (20)

jQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends ForeverjQuery and Rails: Best Friends Forever
jQuery and Rails: Best Friends Forever
 
Metaworks3
Metaworks3Metaworks3
Metaworks3
 
11-DWR-and-JQuery
11-DWR-and-JQuery11-DWR-and-JQuery
11-DWR-and-JQuery
 
11-DWR-and-JQuery
11-DWR-and-JQuery11-DWR-and-JQuery
11-DWR-and-JQuery
 
Rp 6 session 2 naresh bhatia
Rp 6  session 2 naresh bhatiaRp 6  session 2 naresh bhatia
Rp 6 session 2 naresh bhatia
 
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPTHSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
 
웹기반 Ajax개발을 위한 프레임워크 - metaworks3 (메타웍스3)
웹기반 Ajax개발을 위한 프레임워크 - metaworks3 (메타웍스3)웹기반 Ajax개발을 위한 프레임워크 - metaworks3 (메타웍스3)
웹기반 Ajax개발을 위한 프레임워크 - metaworks3 (메타웍스3)
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's New
 
MVC pattern for widgets
MVC pattern for widgetsMVC pattern for widgets
MVC pattern for widgets
 
Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1
 
Documenting from the Trenches
Documenting from the TrenchesDocumenting from the Trenches
Documenting from the Trenches
 
Jquery beltranhomewrok
Jquery beltranhomewrokJquery beltranhomewrok
Jquery beltranhomewrok
 
Jquery beltranhomewrok
Jquery beltranhomewrokJquery beltranhomewrok
Jquery beltranhomewrok
 
J Query
J QueryJ Query
J Query
 
Key Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UKKey Insights into Development Design Patterns for Magento 2 - Magento Live UK
Key Insights into Development Design Patterns for Magento 2 - Magento Live UK
 
Jquery Basics
Jquery BasicsJquery Basics
Jquery Basics
 
Introduction to JSP
Introduction to JSPIntroduction to JSP
Introduction to JSP
 
React on Rails - RailsConf 2017 (Phoenix)
 React on Rails - RailsConf 2017 (Phoenix) React on Rails - RailsConf 2017 (Phoenix)
React on Rails - RailsConf 2017 (Phoenix)
 
Lift Framework
Lift FrameworkLift Framework
Lift Framework
 
Web2 - jQuery
Web2 - jQueryWeb2 - jQuery
Web2 - jQuery
 

More from Atlassian

International Women's Day 2020
International Women's Day 2020International Women's Day 2020
International Women's Day 2020
Atlassian
 
10 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 202010 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 2020
Atlassian
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App Showcase
Atlassian
 
Let's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UILet's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UI
Atlassian
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge Runtime
Atlassian
 
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceForge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User Experience
Atlassian
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge Triggers
Atlassian
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in Forge
Atlassian
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy Model
Atlassian
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI System
Atlassian
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the Hood
Atlassian
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIs
Atlassian
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch Plugin
Atlassian
 
Tear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingTear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the Building
Atlassian
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterNailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that Matter
Atlassian
 
Building Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindBuilding Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in Mind
Atlassian
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Atlassian
 
Beyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsBeyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced Teams
Atlassian
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamThe Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
Atlassian
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in Mind
Atlassian
 

More from Atlassian (20)

International Women's Day 2020
International Women's Day 2020International Women's Day 2020
International Women's Day 2020
 
10 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 202010 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 2020
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App Showcase
 
Let's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UILet's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UI
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge Runtime
 
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceForge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User Experience
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge Triggers
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in Forge
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy Model
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI System
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the Hood
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIs
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch Plugin
 
Tear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingTear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the Building
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterNailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that Matter
 
Building Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindBuilding Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in Mind
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
 
Beyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsBeyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced Teams
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamThe Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in Mind
 

Recently uploaded

Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 

Recently uploaded (20)

Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 

No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian Summit 2010

  • 1. Macro Definition Referencing Confluence Objects Macro has a body Anything the user types within $body The body of the macro the body of the macro will be $param0-n The parameters passed to your available in the macro in the macro (as available) $body variable. $param<name> Named parameters passed to your Use unprocessed The body of the macro will be macro (as available) macro body output exactly as entered, $config The BootstrapManager object, including any HTML markup. useful for retrieving Confluence For example if the macro body is properties '<b>body</b>', it will be $content The current ContentEntity object displayed as 'body' in the page. that this macro is a included in (if Escape HTML in The body of the macro will be available) macro body output with HTML markup $space The Space object that this content escaped. So if the macro body is object is located in (if relevant) '<b>body</b>', it will be $generalUtil A GeneralUtil object, with useful displayed as '<b>body</b>' in utility methods for URL encoding the page. etc Convert macro body The body of the macro will be $action A blank ConfluenceActionSupport wiki markup to HTML converted from wiki text to object, useful for retrieving i18n HTML markup. So if the macro text if needed body is '*body*', it will be $webwork A VelocityWebWorkUtil object, for displayed as 'body' in the page. its htmlEncode() method Output - Macro Choose this if you want to write $req The current HttpServletRequest generates HTML markup your macro with HTML object (if the page is rendered as a elements. result of an HTTP request) Output - Macro Choose this if you want to write $res The corresponding generates wiki markup your macro with wiki markup. HttpServletResponse object (not Velocity Markup recommended to be played with) $userAccessor For retrieving users, groups and ## Some text A comment checking membership #var1 A variable $permissionHelper For determining user rights #set($var1=”abc”) Setting a variable Examples #if ($var1 == “abc”) Simple if-else statement … ${content.id} Page id of current page #else [$762573668] Markup to create link to … page with that id #end $action.getHelper() Referencing another user <a Embedding a variable within .renderConfluenceMacro macro href="viewpage.action? wiki markup ("{anothermacro}") pageId=$pageid">$linkb ody</a> Recent Confluence versions & dependencies #set($page = "$ Using formal references to refer Confluence jQuery Velocity {prefix}ref$pageid") to a variable within a string 2.8 1.2.3 1.5 2.9 1.2.3 1.5 jQuery tips 2.10 1.2.3 1.5 Must access as jQuery not $ 3.0 1.2.6 1.6.1 3.1 1.3.2 1.6.1 <script type="text/javascript"> jQuery(document).ready(function() 3.2 1.3.2 1.6.1 { jQuery calls here }); </script> References Confluence manual: Working with macros http://confluence.atlassian.com/x/eyAC Confluence development: User macros http://confluence.atlassian.com/x/hRE Confluence Shared user macro library http://confluence.atlassian.com/x/KoCjAg Confluence objects accessible from Velocity http://confluence.atlassian.com/x/EBQD Atlassian Confluence forum http://forums.atlassian.com/forum.jspa?forumID=96 jQuery http://jquery.com/ Firebug http://getfirebug.com/ Adaptavist jQuery versions article https://www.adaptavist.com/display/jQuery/Versions
  • 2. Macro 1: Response time Example usage: {response-time} Please see this page for full listing: http://confluence.atlassian.com/display/DISC/Response+Time Macro 2: color-table (final version) Example usage: {color-table:A2C1D5|BFEBEF} ## Macro name: color-table ## Macro has a body: N ## Body format: n/a ## Output: HTML ## ## Developed by: Charles Hall ## Developed for: All users ## Date created: 23/02/2010 ## Installed by: Charles Hall ## Apply coloring to alternate rows of any tables with the class of confluenceTable. #set($oddcolor= $param0) #set($evencolor= $param1) ## Check for valid odd color, otherwise use default #if (!$oddcolor) #set ($oddcolor="ffffff") #end ## Check for valid even color, otherwise use default #if (!$evencolor) #set ($evencolor="ededed") #end <script type="text/javascript" defer="defer"> jQuery(document).ready(function() { //colour code odd and even table rows jQuery("table.confluenceTable tr:nth-child(odd)").css("background-color", "#$oddcolor"); jQuery("table.confluenceTable tr:nth-child(even)").css("background-color", "#$evencolor"); }); </script> Macro 3: watermark (final version) Example usage: {watermark: logo.gif|no-repeat|1000}
  • 3. ## Macro name: astrium-watermark ## Macro has a body: N ## Body format: n/a ## Output: HTML ## ## Developed by: Charles Hall ## Developed for: Astrium wiki ## Date created: 31/03/2010 ## Installed by: Charles Hall ## define a watermark image for the current page #set($image= $param0) #set($repeat = $param1) #set($minheight= $param2 + 'px') <script type="text/javascript" defer="defer"> jQuery(document).ready(function() { /*Default theme*/ if (jQuery("#header-menu-bar").length) { jQuery('#content').css('background-image', 'url($config.getBaseUrl() $content.getAttachmentNamed("$image").getDownloadPath())'); ## Add the specified repeat behaviour #if ($repeat) jQuery('#content').css('background-repeat', '$repeat'); #end ## Check for a specified minimum height #if ($minheight) jQuery('#content').css('height', '$minheight'); #end jQuery('#content').css('vertical-align', 'top'); } /*Left nav theme*/ if (jQuery(".sidebar div.leftnav").length) { jQuery('#mainViewPane').css('background-image', 'url($config.getBaseUrl() $content.getAttachmentNamed("$image").getDownloadPath())'); ## Add the specified repeat behaviour #if ($repeat) jQuery('#mainViewPane').css('background-repeat', '$repeat'); #end ## Check for a specified minimum height #if ($minheight) jQuery('#mainViewPane').css('height', '$minheight'); #end jQuery('#mainViewPane').css('vertical-align', 'top'); } /*Clickr theme*/ if (jQuery("#MegaFooter").length) {
  • 4. jQuery('#main').css('background-image', 'url($config.getBaseUrl() $content.getAttachmentNamed("$image").getDownloadPath())'); ## Add the specified repeat behaviour #if ($repeat) jQuery('#main').css('background-repeat', '$repeat'); #end ## Check for a specified minimum height #if ($minheight) jQuery('#main').css('height', '$minheight'); #end jQuery('#main').css('vertical-align', 'top'); } }); </script> Macro 4: draft-watermark Example usage: {draft-watermark} ## Macro name: draft-watermark ## Macro has a body: N ## Body format: n/a ## Output: HTML ## ## Developed by: Charles Hall ## Developed for: All users ## Date created: 19/04/2010 ## Installed by: Charles Hall ## inserts a Draft watermark image for the current page ## N.B. Calls the watermark user macro ## draft.gif must reside in "company" space #set($url="http://globalcorp.com/confluence/download/attachments/74416134/draft.gif") $action.getHelper().renderConfluenceMacro("{watermark:$url|no-repeat|1000}")