SlideShare a Scribd company logo
1 of 4
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

Call by value and call by reference in java
Call by value and call by reference in javaCall by value and call by reference in java
Call by value and call by reference in javasunilchute1
 
Array Processors & Architectural Classification Schemes_Computer Architecture...
Array Processors & Architectural Classification Schemes_Computer Architecture...Array Processors & Architectural Classification Schemes_Computer Architecture...
Array Processors & Architectural Classification Schemes_Computer Architecture...Sumalatha A
 
Divide And Conquer.pptx
Divide And Conquer.pptxDivide And Conquer.pptx
Divide And Conquer.pptxSHAILIPATEL19
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAMehak Tawakley
 
Object-Oriented Programming with Java UNIT 1
Object-Oriented Programming with Java UNIT 1Object-Oriented Programming with Java UNIT 1
Object-Oriented Programming with Java UNIT 1SURBHI SAROHA
 
Longest Common Sub-sequence (LCS)
Longest Common Sub-sequence (LCS)Longest Common Sub-sequence (LCS)
Longest Common Sub-sequence (LCS)Badrul Alam
 
Presentation JEE et son écossystéme
Presentation JEE et son écossystémePresentation JEE et son écossystéme
Presentation JEE et son écossystémeAlgeria JUG
 
06 abstract-classes
06 abstract-classes06 abstract-classes
06 abstract-classesAnup Burange
 
Practical Digital Image Processing 1
Practical Digital Image Processing 1Practical Digital Image Processing 1
Practical Digital Image Processing 1Aly Abdelkareem
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaMadishetty Prathibha
 
Command line arguments.21
Command line arguments.21Command line arguments.21
Command line arguments.21myrajendra
 
The Art of Metaprogramming in Java
The Art of Metaprogramming in Java  The Art of Metaprogramming in Java
The Art of Metaprogramming in Java Abdelmonaim Remani
 
WHAT IS ABSTRACTION IN JAVA
WHAT IS ABSTRACTION IN JAVAWHAT IS ABSTRACTION IN JAVA
WHAT IS ABSTRACTION IN JAVAsivasundari6
 

What's hot (20)

Call by value and call by reference in java
Call by value and call by reference in javaCall by value and call by reference in java
Call by value and call by reference in java
 
Array Processors & Architectural Classification Schemes_Computer Architecture...
Array Processors & Architectural Classification Schemes_Computer Architecture...Array Processors & Architectural Classification Schemes_Computer Architecture...
Array Processors & Architectural Classification Schemes_Computer Architecture...
 
Divide And Conquer.pptx
Divide And Conquer.pptxDivide And Conquer.pptx
Divide And Conquer.pptx
 
JRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVAJRE , JDK and platform independent nature of JAVA
JRE , JDK and platform independent nature of JAVA
 
Object-Oriented Programming with Java UNIT 1
Object-Oriented Programming with Java UNIT 1Object-Oriented Programming with Java UNIT 1
Object-Oriented Programming with Java UNIT 1
 
Jdk,jre,jvm
Jdk,jre,jvmJdk,jre,jvm
Jdk,jre,jvm
 
Mycin
MycinMycin
Mycin
 
Longest Common Sub-sequence (LCS)
Longest Common Sub-sequence (LCS)Longest Common Sub-sequence (LCS)
Longest Common Sub-sequence (LCS)
 
Presentation JEE et son écossystéme
Presentation JEE et son écossystémePresentation JEE et son écossystéme
Presentation JEE et son écossystéme
 
06 abstract-classes
06 abstract-classes06 abstract-classes
06 abstract-classes
 
Practical Digital Image Processing 1
Practical Digital Image Processing 1Practical Digital Image Processing 1
Practical Digital Image Processing 1
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
 
Command line arguments.21
Command line arguments.21Command line arguments.21
Command line arguments.21
 
The Art of Metaprogramming in Java
The Art of Metaprogramming in Java  The Art of Metaprogramming in Java
The Art of Metaprogramming in Java
 
2.2.ppt.SC
2.2.ppt.SC2.2.ppt.SC
2.2.ppt.SC
 
WHAT IS ABSTRACTION IN JAVA
WHAT IS ABSTRACTION IN JAVAWHAT IS ABSTRACTION IN JAVA
WHAT IS ABSTRACTION IN JAVA
 
Javapolymorphism
JavapolymorphismJavapolymorphism
Javapolymorphism
 
Java IO
Java IOJava IO
Java IO
 
OOP java
OOP javaOOP java
OOP java
 

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 InnovationAtlassian
 
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 ConfluenceAtlassian
 
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 ConfluenceK15t
 
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 ConatyAtlassian
 
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 needsAnita 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 ConfluenceAtlassian
 
Macro environment
Macro environmentMacro environment
Macro environmentParth1815
 
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 ArchitectPer 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.8Atlassian
 

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 Foreverstephskardal
 
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 JAVASCRIPTAAFREEN 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 widgetsBehnam 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 UKMax Pronko
 
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
 

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 2020Atlassian
 
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 2020Atlassian
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App ShowcaseAtlassian
 
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 UIAtlassian
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge RuntimeAtlassian
 
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 ExperienceAtlassian
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge TriggersAtlassian
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeAtlassian
 
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 ModelAtlassian
 
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 SystemAtlassian
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the HoodAtlassian
 
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 APIsAtlassian
 
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 PluginAtlassian
 
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 BuildingAtlassian
 
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 MatterAtlassian
 
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 MindAtlassian
 
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 TeamsAtlassian
 
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 TeamAtlassian
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in MindAtlassian
 

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

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

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}")