Written by
Per Ploug Hansen
For umbraco versions:
AllReference
A look at the mysterious macro parameter types and their syntax.
First let's create a simple xslt script which will have 2 simple parameters, a text string and a contentTree type - to recap: A text type is a simple string and a contentTree type is the xml of a selected node.
Adding the parameters
- Create a xslt macro
- Look under the "parameters" tab on the macro settings screen.
- Create a new parameter the alias "text" name "Text property" and type "text"
- Create a second parameter called "contentTree" with the name "Select Node" and the type "contentTree"

Your created parameters should look like the above screen
Writing some basic xslt
Okey so now we have a macro with some parameters. Lets get these parameters into the xslt.
Our Xslt code (without the stylesheet info):
<xsl:template match="/">
<xsl:copy-of select="/macro/text">
<xsl:copy-of select="/macro/contentTree">
</xsl:template>
Inserting the macro on a template
Now insert the macro on a template. You will get prompted by the following screen:

Write some text and pick a node in the content tree by clicking "choose item" - then save. Go take a look at the page in your browser (try viewing the source of the page to see what it actually returns)
Great, you're done with setting up parameters and getting the data into a xslt macro. Let's continue and look at what that data actually look like and how it actually works...