P
P
placebo972020-04-22 03:36:59
WordPress
placebo97, 2020-04-22 03:36:59

How to add a step back button?

The situation is as follows

The user enters the "Clients" section, clicks on client N and gets into the portfolio with works (of this client). After he wants to go back, when he clicks on the button, he is redirected to the home page of the portfolio, where ALL the works are posted, everything would be fine, BUT!. There is pagination, only 7 pages. Let's say the user initially goes to the "Portfolio" section and reaches, say, page 5, clicks on any project, also looks at it and wants to go back, when you click on the "Back" button, he will be thrown to 1 page, which is not good, he will have to scroll through everything again to continue viewing the remaining projects.

I surfed the forums, they write:

<input type="button" onclick="history.back();" value="Назад"/>


But this option is not suitable, because if we use this option, we will again return to the beginning: the user enters clients - selects a client - goes to the portfolio of his work - clicks on the "Back" button - he is transferred to the "Clients" section, but you need to go to the page in the portfolio where this project is located... The

question is, how can I implement this method?

I racked my brains on how to do it, I thought of only 2 buttons:
1. “To portfolio” (transfers to the portfolio page where this project is located)
2. “Back to clients”, in fact, implement it with the above code
But this is just an extreme option, I didn’t want to would use them.

Link to the siteso that everything is visually clear:

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question