Created
June 20, 2013 12:32
-
-
Save dvdsmpsn/5822321 to your computer and use it in GitHub Desktop.
Expand and Include Page User Macro for Confluence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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