It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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.

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 in Confluence

Confluence Server & Data Center 7.0 is here!

Hello Community 👋🏼 I’m Makisa, a product manager on Confluence Server and Data Center. Confluence Server & Data Center 7.0, our latest platform release, is now available and we wanted to shar...

260 views 1 12
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you