Skip to content

Instantly share code, notes, and snippets.

@dvdsmpsn
Created June 20, 2013 12:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dvdsmpsn/5822321 to your computer and use it in GitHub Desktop.
Save dvdsmpsn/5822321 to your computer and use it in GitHub Desktop.
Expand and Include Page User Macro for Confluence
## Macro title: Expand and Include Page
## Macro has a body: N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: David Simpson, AppFusions <david@appfusions.com>
## Date created: 2013-06-20
## Installed by: My Name
## See: https://answers.atlassian.com/questions/182288/is-there-a-shortcut-way-to-use-2-macros-together
## Source: https://gist.github.com/dvdsmpsn/5822321
## This is an example macro
## @param Name:title=Page Name|type=string|required=true|desc=Your page name
## @param SpaceKey:title=Space Key|type=string|desc=Add the space key if including from another space
#if($paramSpace)
#set($includeName = "$paramPacekey:$paramName")
#else
#set($includeName = $paramName)
#end
<ac:macro ac:name="expand">
<ac:parameter ac:name="title">${paramName}</ac:parameter>
<ac:rich-text-body>
<ac:macro ac:name="include">
<ac:default-parameter>${includeName}</ac:default-parameter>
</ac:macro>
</ac:rich-text-body>
</ac:macro>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment