×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Comments paging

Comments paging 8 years 10 months ago #33341

  • Vijay
  • Vijay's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Karma: -6
  • Thank you received: 0
Hi,
I am having an issue with the paging of comments.
When we click the link of paging it loads the comments but it scrolls the page a bit upwards rather than scrolling to the top of comments section.

Please check this page, mattress-advisor.com/Simmons-Beautyrest-Review.html
if you click the page 2 it will scroll the page a little bit. This should scroll to top of comments, where the comments start.

Please let me know what can be done to fix it.

Kind Regards
Vijay

Comments paging 8 years 10 months ago #33436

  • Vijay
  • Vijay's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Karma: -6
  • Thank you received: 0
Can someone help me out. I will be very thankful.


Thanks
Vijay

Comments paging 8 years 10 months ago #33448

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
When I made this it drove me for some reason crazy and I decided to remove it. If you want for the comments to automatically scroll to the top, then add this line:
new Fx.Scroll(window).toElement(this.element);
in media\com_comment\js\views\comments-outer.js on line 385
The whole code block there should look like this:
new pagination({
						container: '.ccomment-pagination',
						total: total,
						itemsPerPage: self.config.comments_per_page,
						startPage: start,
						element: self.element
					}).addEvent('changePage', function (e, el) {
							var page = el.get('data-id');
							self.collection.fetch(true, {start: page});
						new Fx.Scroll(window).toElement(this.element);
						});

Regards,
Daniel

P.S. I would be really happy to see a subscription on your name ;)
The following user(s) said Thank You: Vijay

Comments paging 8 years 10 months ago #33459

  • Vijay
  • Vijay's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Karma: -6
  • Thank you received: 0
Hi Daniel,
Thanks a lot for the fix. I have added it and it works like a charm.

I really want to pay for subscription however I am a small developer, So I will ask my client to buy a subscription.

Thanks Again
  • Page:
  • 1
Time to create page: 0.153 seconds