0

First of all, excuse my poor english... i hope you will get it :)

I have a page that contains a list of entries titles. There a lot of entries so i use pagination to display them.

When you click on an entry, it goes to a page dedicated to the entry and there is some js that may add hashtags to the url. On that page i also have a back link that is supposed to bring you back to the precedent page.

How can i send the user back to the correct paginated page ?

i can't use history.back() because of the hashtags. so i would like to retrieve the "index" of the entry to calculate the correct pagination page... is that possible ? how ?

4
  • This question appears to be off-topic because it is about javascript, not EECMS.
    – Sobral
    Jul 28 '14 at 15:46
  • @RobsonSobral When I read the question, I read that he's asking for a non-JS solution.
    – Anna_MediaGirl
    Jul 28 '14 at 20:15
  • yes..a non js solution...somethin like : {exp:channel:entries channel="gammes" category="{segment_2_category_id}" orderby="title" sort="asc"} {if segment_3 == url_title} {if count > 0 && count<9} page 1 {/if} {if count > 9 && count<18} page 2 {/if} {if count > 18 && count<27} page 3 {/if} {/if} {/exp:channel:entries} but more 'universal' Jul 28 '14 at 20:41
  • @Anna_MediaGirl, he can still move back to a specific point of the history using JS. history.back() isn't the only option. history.go(-1), history.go(-2) can be used too. Every time a JS adds a fragment identifier to the URL, an integer can be saved on a variable and used to know how many points the pagination page are back on history.
    – Sobral
    Jul 28 '14 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.