Skip to end of metadata
Go to start of metadata
Labels:
  1. Sep 12, 2007

  2. Sep 30, 2009

    This code doesn't work for us. We're using 3.0 in IE8 and FF3.5.3

    I copied this code to User Macros and it pasted with line numbers.

    ## 
    02. 
    ## Check for a blank first parameter 
    03. 
    ## 
    04. 
    #if($param0 && $param0.length()>0) 
    05. 
    #set($expandtitle=$param0)

    Wiki Markup in page

    {expand}More info{expand}

    With the line number in the user macro code, it displayed as

    02. 03. 04. (thru to) 59.  > Click here to expand... 60. 61. 62. 63.

    Removing the line numbers from the user macro code, it displayed correctly.

    > Click here to expand...

    However, clicking the > did not show 'More info', but did show 'Error on page' in the status bar.

    1. Oct 25, 2009

      Thanks for making the changes. It works for us now. Still need to remove the numbers tho.

  3. Mar 15, 2010

    Temporary workaround for this is to go into Tools -> View Wiki Markup and copy the codes sitting in between the code macro. Otherwise, works like a charm in both IE and Firefox

  4. Oct 01, 2010

    I am not able to get this working in Confluence 3.3. for some reason (I see that this is Confluence 3.3 and working so i assume i should be able to get it to work). I followed the instructions but I keep getting the following where I get two copies of the toggle instead of the one with the contents hidden. When I go to expand one i get $body instead of the contents. Any thoughts?

    1. Oct 01, 2010

      @Brent - In Confluence 3.4 (scheduled for release October 12th) we'll be making some improvements to User Macros including making them displayable in the Macro Browser. We'll also be providing a new Expand macro that will be supported by Atlassian. The code for the new macro is below (this will be documented in the Confluence Documentation Space when 3.4 is released):

      Macro Name: expand
      Visibility: Visible to all users in the Macro Browser
      Macro Title: Expand
      Description: Embeds an expandable text box into your page
      Macro Body Processing: Render HTML
      Output Format: HTML
      Template:

      Let me know if this works for you, Brent.

      1. Oct 01, 2010

        Thanks Matt! Exciting to hear about 3.4 being just around the corner! This is closer but still isn't working right. It no longer has $body in the expansion but it still has the toggle (now nice little blue triangles) and "Click here to expand..." above and below the text I'm trying to put in the toggle using the below markup:

  5. Nov 02, 2011

    Works like a charm with v3.4.8. 

    Thanks very much for this useful macro !