Hi,
i dont know which String is wrong or unknown.
@Override public String execute(Map<String, String> parameters, String bodyContent, ConversionContext conversionContext) throws MacroExecutionException { if (bodyContent == null) { bodyContent = ""; } String headlineTop = parameters.get("headline-top"); String headlineMain = parameters.get("headline-main"); String bodyText = bodyContent; String buttonText = parameters.get("button-text"); String buttonLink = parameters.get("button-link"); String backgroundImage = parameters.get("background-image"); String css = parameters.get("custom-css-class") + " " + parameters.get("body-align"); String height = parameters.get("height"); // default="600" // Set Map Map<String, Object> data = MacroUtils.defaultVelocityContext(); data.put("headlineTop", headlineTop); data.put("headlineMain", headlineMain); data.put("bodyText", bodyText); data.put("buttonText", buttonText); data.put("buttonLink", buttonLink); data.put("backgroundImage", ""); data.put("css", css); data.put("height", height); try { return VelocityUtils.getRenderedTemplate(MACRO_BODY_TEMPLATE, data); } catch (Exception e) { e.printStackTrace(); return null; } }
<xhtml-macro name='teaserbox' class='com.xxx.macro.TeaserMacro' key='xhtmlLayoutMacro-TeaserBox' icon="/download/resources/${project.groupId}.${project.artifactId}/images/logo_grey.png"> <description key="layoutmacro.create-link.description"/> <category name="formatting"/> <parameters> <parameter name="headline-top" type="string" /> <parameter name="headline-main" type="string" /> <parameter name="button-text" type="String" /> <parameter name="button-link" type="confluence-content"/> <parameter name="background-image" type="attachment" /> <parameter name="body-align" type="enum"> <value name="left"/> <value name="right"/> <value name="center"/> </parameter> <parameter name="custom-css-class" type="string" /> <parameter name="height" type="string" default="600" /> </parameters> </xhtml-macro>
Can anyone help me? Maybe it is very simple.
Community moderators have prevented the ability to post new answers.
type="string" != type="String" type="string" is correct
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.