Umbraco Macros

Concerning the use of Macros in umbraco

Macros are umbraco's means of inserting Controls or Transforms into templates or content, to start.

Macros are the carrier for custom .NET controls and XSLT transforms.  Macros can be thought of as shortcuts or includes, in a sense.  Macros can have parameters, which are values relevant to the control or transforms purpose.

Macros can be placed in transforms, templates, and rich-text, and the umbraco GUI provides a button for this in the relevant section.

Macros can be quirky, and often fail silently. If something isn't working, a good place to look is at any Macros involved.  Ensure the Editor and Cache properties are how you want.  Check that the macro still references the XSLT, Python, .NET user control, or .NET custom control file that it should be. Check the Macro parameters and ensure you are using the proper aliases when setting or querying them.

 It can sometimes take several attempts at setting and saving a macro before it remembers everything correctly.

Macros I use frequently include ones named "Insert Thumbnail Link", "Insert Image", and so on.  Another, referenced in all base page templates, is "Google Analytics" which calls the XSLT that inserts my tracking information on all pages.

Check XHTML  «  feebdack.com  Copyright ©  Xander Lih  2000-2009   »  Check CSS