You are viewing a plain text version of this content. The canonical link for it is here.
Posted to infrastructure-issues@apache.org by "Gavin (JIRA)" <ji...@apache.org> on 2010/06/01 14:07:37 UTC

[jira] Closed: (INFRA-2765) Recover user macro {indent}

     [ https://issues.apache.org/jira/browse/INFRA-2765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gavin closed INFRA-2765.
------------------------

    Resolution: Fixed

Fixed, the macro was still there but using the deprecated 

#set($globalHelper=$action.getGlobalHelper())

instead of just 

#set($globalHelper=$action.getHelper())

> Recover user macro {indent}
> ---------------------------
>
>                 Key: INFRA-2765
>                 URL: https://issues.apache.org/jira/browse/INFRA-2765
>             Project: Infrastructure
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Confluence
>            Reporter: Chi Runhua
>
> In Geronimo, we use a customized macro {indent} for document writing. The macro is missing after upgrade to Confluence 3.2.
> Could someone help add the macro back?
> Thanks in advance.
> macro name: indent
> Template as followed:
> #set($globalHelper=$action.getHelper())
> #set($renderer=$globalHelper.getWikiStyleRenderer())
> #set($context=$content.toPageContext())
> #set($renderedContent=$renderer.convertWikiToXHtml($context, $body).trim())
> #if ($param0)
> #set($indentWidth=20 * $generalUtil.convertToInteger($param0))
> #else
> #set($indentWidth=20)
> #end
> #set($indentClass="indent${indentWidth}")
> #if ($renderedContent.startsWith("<p>") && $renderedContent.endsWith("</p>"))
> #set($renderedContentEnd=$renderedContent.length() - 4)
> #set($renderedContent=$renderedContent.substring(3, $renderedContentEnd))
> #end
> <div class="${indentClass}" style="margin-left: ${indentWidth}px;">${renderedContent}</div>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.