code generator pagination

5 posts by 2 authors in: Forums > CMS Builder
Last Post: April 4, 2011   (RSS)

By rez - April 1, 2011

when using the pagination, the "back to list" on a details page is taking me back to page one. If I'm on page 5 this is not convenient. How can i make the link go back to the page that the record I am viewing details about was on instead of the beginning?

thanks.

Re: [rez] code generator pagination

By zip222 - April 2, 2011

Try replacing the default back to list url that the CMS gives you with the javascript below - this will take the user back one page in their history...

<a href="javascript:history.go(-1)">Back</a>

Re: [zip222] code generator pagination

By rez - April 3, 2011

Unfortunately, I also have the latest 3 article headlines on the home page. That code would take the visitor to the home page if that's where they came from.

No way to detect which list page the listing is on? Any other ideas? As records are added this problem becomes worse.

Or if i could use that JavaScript only if coming from the paginated page.

Thanks for the help.

Re: [zip222] code generator pagination

By rez - April 4, 2011 - edited: April 4, 2011

Thanks.

1. Coming from the home page, I believe the current default, back to the beginning link from the details page would be best (pagination page 1).

2. Coming from any paginated headline page, i would like the return link on the details to go back to that paginated page that they were on.

I will also be putting headlines on various pages throughout the site. Currently, I am thinking all those details pages can simply point back to page 1 of the paginated pages which is the newest news (just like the home page situation- #1). Then a visitor can start reading news and be returned to each paginated page they came from (#2).

Make sense?