Change URL to which Confluence redirects after blog submission?

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:

After they enter the blog submission and hit save, Confluence reroutes them to their individual blog 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 Simpson Community Champion Jun 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


<script> if (document.referrer.indexOf('createblogpost.action') != -1) { location.replace(''); } </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.

Thanks so much! This worked perfectly.

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 Simpson Community Champion Jun 29, 2011

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

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
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,078 views 2 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you