markocupic / contao-news-infinite-scroll-bundle

Contao 4 module: Add Infinite Scroll to the Contao Newslist Module
4 stars 1 forks source link

Load first page per ajax #14

Closed Xendiadyon closed 6 months ago

Xendiadyon commented 2 years ago

Hello @markocupic

thank you for your great extension. I am using it for a long list of songs, which are loaded step-by-step on scrolling. I also have the possibility to show the news_full of a song (which is shown on top of the list).

But now I am hitting problems with duplicate content (SEO).

Lets say I have following setting: URL: songlist/song-e/ Frontend:

Now the problem is that the detail page /song-e/ always shows the first three items (first page) of the newslist (Song A, B, C). When I have loaded the detail page /song-g/, then again the Songs A,B,C are displayed under the current song G.

This results in the songs A,B,C being present on the detail page of each song, providing duplicate content.

I am aware that this is no issue with your extension; this is default behavior of a news detail page followed by a news list.

But the question arises, if you could somehow tweak your extension in such a way that in the beginning, no page is loaded. And only when starting scrolling, the first page (Song A, B, C) is loaded dynamically per ajax (and thus not accessible/crawlable by google). This would prevent indexing the first page of the newslist on every detail page.

My idea would be to start with a page zero and loading page 1 on demand when scrolling.

Could you imagine a setting/solution for my problem? (other than adding three empty, invisible news items at the first page, which would be quite hacky)

Thank you very much!