Written by Per Ploug Hansen     For umbraco versions: All

Reference
A look at the mysterious macro parameter types and their syntax.

Contents

What is Macro parameters?

A macro parameter is in short a value you send to a Macro from Umbraco. This could be piece of text, a node ID or even a big chunk of xml. To do this you have a handfull of different form controls you can use:

  • bool - A true/false value
  • contentPicker - the ID of the selected node as a single integer.
  • contentRandom - the xml from a random node.
  • contentTree - the xml of the selected node and it's child nodes
  • contentType - the alias of a selected content type as a string
  • contentTypeMultiple - a comma separated list of selected content type aliases
  • mediaCurrent - the xml of the selected media item
  • numer - an integer
  • propertyTypePicker - the alias of the selected property type
  • propertyTypePickerMultiple - a comma separated list of selected property type aliases 
  • tabPicker - the caption of the selected tab
  • tabPickerMultiple - a comma separated list of selected tab captions
  • text - a text string
  • textMultiline - a text string.

 Let's continue and look at how you use macro parameters with an xslt macro and what they look like in your xslt.