Change URL to which Confluence redirects after blog submission?

ITops123
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.
June 17, 2011

We want to increase participation in the blogging feature on Confluence. To do this, we have a {rw-news} macro on the space's main page and a hard-coded link on which people can click if they want to contribute a post. That link takes them to this page:

http://tools.tntp.org/confluence/pages/createblogpost.action?spaceKey=SPACEKEY

After they enter the blog submission and hit save, Confluence reroutes them to their individual blog post:

http://tools.tntp.org/confluence/display/to/2011/06/17/Title+of+post

This is confusing to our users because it does not redirect them back to the space's main page, nor does it redirect them to the dashboard. Instead, they end up in the nuts and bolts of the blog function for Confluence, with no clear path back to the originating page.

What can we do about this?

2 answers

1 accepted

1 vote
Answer accepted
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 19, 2011

I would really advise against this as users won't see what the final blogpost looks like, so won't spot any mistakes.

However, if this really is important, the quickest way to sneak this in without custom plugin development would be to use javascript to check the referer...

Browse to:

Confluence Admin | Look and Feel | Custom HTML | At the end of the HEAD

Add...

<script> if (document.referrer.indexOf('createblogpost.action') != -1) { location.replace('http://wiki.example.com/dashboard.action'); } </script>

...or similar.

If you wish to redirect to a different page depending on the space, then you'll need to remember the spaceKey and redirect appropriately.

ITops123
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.
June 19, 2011
Thanks so much! This worked perfectly.
1 vote
Alain Moran
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.
June 28, 2011

That's certainly one way of doing it, personally I'd create a plugin which replicates the do create blogpost action's xwork definition in a different location to the original and changes the result definition so that it redirects to the location of your choosing.

That way the original functionality is still there for when you need it & you can adjust your theme so that it points people to the new action, also on completion of the blog-post the original post wont need to load and then unload as the javascript gets executed - reducing load on your server & avoiding the unsightly 'flashing' that's likely to occur with the JS path.

David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 29, 2011

Agreed. A custom plugin would be best. My answer is somewhat simpler/easier for some people to implement :)

Alain Moran
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.
June 29, 2011

A custom plugin in this case however should only require an atlassian-plugin.xml file placed into a resources folder and then zipped & renamed to .jar in much the same way as you would package a user macro.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events