Hey there,
I want to create a simple macro, where a user has to put in a number, which is afterwards used inside another macro to do a database request.
So now my question is, how can I call a macro within my macro? Or is this even possible?
Kind regards,
Christopher Graß
You can use another macro inside your user macro with this:
<ac:macro ac:name="profile"> <ac:parameter ac:name="user">$content.getCreatorName()</ac:parameter> </ac:macro>
Naturally you'd be using a different name and different parameter values based on what the macro your including uses.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Within your macro, construct the appropriate wiki markup or xhtml markup and render it using the appropriate renderer.
For a user macro it would be something like this when using wiki markup:
$action.getHelper().renderConfluenceMacro("{noformat}stuff{noformat}")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I m afraid I don't know what you exactly mean by "appropriate renderer".
Do you mean I have have to choose the correct rendering definition when I want to create a macro?
Let's say, I want to use the SQL macro, this is how I started.
## @param PfNummer:title=Nummer|type=string|required=true {sql:dataSource=myDB} select value1,value2 from test_table where pf_value3='$paramPfNummer' {sql}
The input variable gets replaced inside the sql string, but obviously the macro does not execute the sql string.
Any idea how I can solve this problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Edit: I am currentyl working with Confluence version 4.3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.