I am pursuing the task of adding my custom tabs inside my Confluence set up. I have chosen the ‘Advanced’ region as the favourable spot to realize this.
So i click on the Space name. Then I goto ‘Browse>>Advanced’ and see This http://imageshack.us/f/405/advanc.png . The “Freeway Project Creation ” tab we see in this image was custom added by me.
I wrote this class
package com.atlassian.myorg;
import com.atlassian.confluence.core.ConfluenceActionSupport;
import com.atlassian.confluence.pages.AbstractPage;
import com.atlassian.confluence.pages.actions.PageAware;
import com.opensymphony.xwork.Action;
/**
* The simplest action possible
*/
public class ExampleAction extends ConfluenceActionSupport
{
@Override
public String execute() throws Exception
{
return Action.SUCCESS;
}
}
used this atlassian-plugin.xml
<atlassian-plugin key="${project.groupId}.${project.artifactId}" 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>
<resource type="i18n" name="i18n" location="message" />
<web-item name="add-fpc-label-action-web-ui" key="add-fpc-label-action-web-ui" section="system.space" weight="150">
<description key="item.add-fpc-label-action-web-ui.link.desc">Allows the Create Freeway Project functionality.</description>
<label key="Freeway Project Creation"/>
<link linkId="add-fpc-label-action">/plugins/examples/hello.action?key=$helper.space.key</link>
</web-item>
<xwork name="My Example Action" key="example-action">
<description>Shows a simple "Hello, World!" Action</description>
<package name="examples" extends="default" namespace="/plugins/examples">
<default-interceptor-ref name="validatingStack" />
<action name="hello" class="com.atlassian.myorg.ExampleAction">
<result name="success" type="velocity">/templates/example/hello.vm</result>
</action>
</package>
</xwork>
</atlassian-plugin>
The below seen is the VM
<html>
<head>
<title>This is my Example action!</title>
<meta name="decorator" content="atl.general" />
</head>
<body>
<strong>Hello, Confluence World!</strong>
</body>
</html>
As a result when i click on this tab named “Freeway Project Creation ” i see this page http://imageshack.us/f/846/imageprf.png/
Well this was good enough. But i wanted to have this page seen in the ‘body area’ besides the sidebar. Like for example if we click on the “Space Admin” tab and we click on ‘Edit Space Label’ from the side bar; we see the resulting page in the ‘body area’ marked http://imageshack.us/f/809/bodyarea.png/.
Would like to have your sugessions as to how that can be achieved?
Thanks
A
Please try this