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
Accepted answer
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
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

919 views 13 11
Join discussion

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