Hello,
My plugin performs export of selected pages to word document.
It is my atlassian-plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2">
<plugin-info>
<description>${project.description}</description>
<version>${project.version}</version>
<vendor name="${project.organization.name}" url="${project.organization.url}"/>
</plugin-info>
<xhtml-macro name="spec" class="com.atlassian.confluence.Macro.ExampleMacro" key="my-macro1">
<parameters>parameter name="page" type="confluence-content"</parameters>
</xhtml-macro>
<resource type="i18n" name="i18n" location="${atlassian.plugin.key}"/>
<resource type="velocity" name="template1" location="/templates/firstpart.vm"/>
<resource type="velocity" name="template2" location="/templates/second.vm"/>
<resource type="velocity" name="template3" location="/templates/third.vm"/>
<resource type="velocity" name="template4" location="/templates/fourth.vm"/>
<resource type="velocity" name="template5" location="/templates/five.vm"/>
<resource type="velocity" name="template6" location="/templates/six.vm"/>
<resource type="download" name="image002.gif" location="/templates/image002.gif"/>
<web-resource key="somekey" name="some description">
<resource type="download" name="spec.js" location="/templates/spec.js"/>
<context>page</context>
</web-resource>
<web-item name="Export Spec" i18n-name-key="export-spec.name" key="export-spec" section="system.content.action/secondary" weight="1000">
<description key="export-spec.description">The Export Spec Plugin</description>
<label key="Export Spec"/>
<link linkId="export-spec-link">/WebWork/specsearch/specsearch.action?pageId=$page.id</link>
</web-item>
<xwork name="specbuild" key="specbuild">
<package name="specsearch" extends="default" namespace="/WebWork/specsearch">
<default-interceptor-ref name="defaultStack"/>
<action name="specsearch" class="com.atlassian.confluence.WebWork.SpecSearchAction">
<result name="success" type="velocity">/templates/display.vm</result>
</action>
</package>
</xwork>
</atlassian-plugin>
My plugin was implemented in following way:
1. User select some page and click on Export button (Web Item)
2. It invokes XWork action.
3. XWork action redirect to velocity template and pass parameter Current Page.
4. Velocity template generates html with contents of pages.
5. At the end of velocity template appears export button.
It is very complicated. I'd like to perform export different way:
1. User select some page
2. Click on Export button and as result will created word document with content of all pages that appear under selected page.
How can I do It?
Thank you,
Viktorya
Perhaps it would be better to ask this question in the developer community.
https://community.developer.atlassian.com/
Regards, Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.