Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

User Macros: Making Your Own Improvements to Confluence - Atlassian Summit 2012

3,546 views

Published on

Published in: Technology, Design
  • Be the first to comment

User Macros: Making Your Own Improvements to Confluence - Atlassian Summit 2012

  1. 1. ATLASSIAN SUMMIT 2012USER MACROS:MAKING YOUR OWN CHANGESTO CONFLUENCESteve GoldbergTechnical Writerstevegoldberg@venda.com All information contained within this document is confidential. © Venda Ltd. all rights reserved.
  2. 2. WTF ARE USER MACROS?• Re-usable snippets that enhance the functionality of Confluence.• Wiki markup, HTML, CSS, JavaScript, Velocity Templating Language, and other macros.• Great for page templates, getting around quirks, and solving those “I wish there was a plugin for…” moments.• Easy to get started.• Free and support them yourself. All information contained within this document is confidential. © Venda Ltd. all rights reserved.
  3. 3. FEATURES• Supports wide range of common web techs and Velocity.• Appear in the Macro Browser like regular macros.• Input from editors when writing documentation.• Input from Confluence.• Conditional logic and variables. All information contained within this document is confidential. © Venda Ltd. all rights reserved.
  4. 4. SIMPLE USER MACROS• Stitch together existing macros, simple styling and objects.• Example uses: • Add a bit of CSS to a single page • Captions for images and tables • Table column width setter • „Under development‟ note box. All information contained within this document is confidential. © Venda Ltd. all rights reserved.
  5. 5. All information contained within this document is confidential. © Venda Ltd. all rights reserved.
  6. 6. SIMPLE USER MACROS: CAPTIONS• Avoids using in-page styling.• Style defined externally with stylesheet.• Less hassle for editors.• Less hassle when styling needs to change. All information contained within this document is confidential. © Venda Ltd. all rights reserved.
  7. 7. COMPLEX MACROS: “PERMCHECK”• Two similar questions I got asked: 1. How can I know what permissions apply to space when I‟m not an admin? 2. How can I know quickly if I can share this page with a client? All information contained within this document is confidential. © Venda Ltd. all rights reserved.
  8. 8. COMPLEX MACROS: “PERMCHECK” #2• Solution: • Make important space-level permissions visible. • To do this, create a dynamically generated, informative widget visible on every page. All information contained within this document is confidential. © Venda Ltd. all rights reserved.
  9. 9. COMPLEX MACROS: “PERMCHECK” #31. Declare a number of helpful variables.2. Declare a number of variables with default values.3. Build arrays.4. Check arrays.5. Work out permissions.6. Build the widget. All information contained within this document is confidential. © Venda Ltd. all rights reserved.
  10. 10. DECLARE A NUMBER OF HELPFUL VARIABLES
  11. 11. DECLARE A NUMBER OF DEFAULT VARIABLES
  12. 12. BUILD AN ARRAY WITH ALL THE SPACEGROUP PERMISSIONS
  13. 13. BUILD AN ARRAY WITH ALL THE PAGE GROUPPERMISSIONS
  14. 14. CHECK SPACE ARRAY FOR SPECIFIED GROUPS
  15. 15. CHECK PAGE ARRAY FOR SPECIFIED GROUPS
  16. 16. WORK OUT THE PERMISSIONS
  17. 17. BUILD THE WIDGET WITH HTML
  18. 18. WIDGET SUMMARY• No plugin solution available/viable.• Used own knowledge and community for support.• Implemented it myself; support it myself.• Free. All information contained within this document is confidential. © Venda Ltd. all rights reserved.
  19. 19. MACROS ARE EASY• Alleviate your frustration.• Start with existing macros, basic HTML, and CSS.• Improve upon it by reading up on more complex HTML, JavaScript, and Velocity.• Use them for templates to push changes globally at once. All information contained within this document is confidential. © Venda Ltd. all rights reserved.
  20. 20. MACRO COMMUNITY AND HELPFUL LINKSJoin me and others in aggregating, sharing, and improving macros:•Macro introduction: http://confluence.atlassian.com/x/UolYDQ.•Atlassian Answers: https://answers.atlassian.com/.•VTL Guide: http://velocity.apache.org/engine/releases/velocity-1.6.Submit your macros or fork mine:•GitHub: https://github.com/stevegoldberg/ConfluenceMacros.Thank you. All information contained within this document is confidential. © Venda Ltd. all rights reserved.

×