Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Load macro in Velocity .vmd file doesn't work, but I think I have the right name. Problem?

Hauke Hörhold
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2018

Hi. I installed the plugin „Page Fields for Confluence“.

But I want to load the macro „page-field-value-by-name“ in a .vmd file, and that’s not working. I did it like this in „page.vmd“ template file:

$helper.renderConfluenceMacro("{page-field-value-by-name:fieldName=HasHeaderImage}")

But the response is:

Unknown macro: {page-field-value-by-name}

 So I looked into the „atlassian-plugin.xml“, but there the macro is called as I wrote it, that's the part:

    <xhtml-macro name="page-field-value-by-name" key="page-property-by-keyname-for-confluence-macro" icon="/download/resources/com.tse.confluence.pageproperties.plugin.confluence-page-properties-plugin:confluence-page-properties-plugin-resources/images/scmenthusiast.png" class="com.tse.confluence.pageproperties.plugin.api.PagePropertyByKeyMacro">
        <device-type>mobile</device-type>
        <description key="confluence-page-fields-by-keyname-macro.desc" />
        <category name="external-content" />
        <parameters>
            <parameter name="fieldName" type="string" required="true" />
            <parameter name="pageId" type="string" />
        </parameters>
    </xhtml-macro>

 What’s the problem? Can you help me out? Maybe it's because of the "device-type" that's set to "mobile"? But I don't even know what that does... EDIT: I changed it to "blog" (read somewhere that it exists), but that changed nothing.

Thank you very much! 😊

EDIT:
I also tried to load the macro in the .vmd like this, but there he only gives me "HasHeaderImage", as if it isn't working like this anymore...

 <ac:macro ac:name="page-field-value-by-name">
            <ac:parameter ac:name="fieldName">HasHeaderImage</ac:parameter>
  </ac:macro>

 

1 answer

1 accepted

0 votes
Answer accepted
Hauke Hörhold
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2018

Well, okay... I just took another plugin and it worked perfectly. With this plugin you can achieve same things: https://marketplace.atlassian.com/apps/5295/comala-metadata?hosting=server&tab=overview

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events