Is there a way to create a link that will return users to the previous Confluence page?

I have a Space where I publish and report deployment information for enhancement requests. This information can be used by several different teams, each with their own space.

What I want to do is provide the reporting link to each Team space, so that they can review the information provided, but I want to be able to have a link on the Deployment page that will direct the users back to their Space when they are finished.

Now, i understand that the Back button on the Web Browser is an option, but I would like to offer something that is a little more intuitive, something that recognizes the previous Space, not the previous Page. This way the user can navigate within the pages of one space and then return to their space when they're ready, instead over selecting the menu options.

Crazy thought, I know. But maybe someone has considered this and tried it.

3 answers

1 accepted

Accepted Answer
1 vote

Hi,

you can create it via javascript

<A HREF="javascript:javascript:history.go(-1)">Click here to go back to previous page</A>

And there is history.go(-1). You can create it like parametrs for back macro and set, how many pages you can go back. It isnt exactly what you want (go back to space), but i dont think that is possible.

You can try to rebuild it that you create in javascript parser for URLs from history (via history.go(-i) where i is from 1 to 10 for example) and parse the part with space name.

Davin Studer Community Champion Sep 19, 2014

I thought about parsing the previous href too, but the problem with that is if the page title has special characters then the url will not have the space name in it anymore.

Hmmm... That is true :/ So then try to get a meta data via Velocity?

1 vote
Davin Studer Community Champion Sep 18, 2014

Are the users setting their own personal site home in their user settings? If so, then you could just provide a link to http://{confluence_base_ul} and they will be directed to their team home page. Another option would be to have pages within each space that does a page include of the report content ... that way they don't have to leave their space at all.

I'm going to giving the javascript a shot. Luckily, I don't have any pages with special characters. I just have several pages in one space that will be accessed by many different users from other Team spaces.

You guys ROCK!!! Thank you so much.

I hope that you will done it :) If you will do it, closed this question. Regards, Aleš

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

91 views 3 6
View post

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