I have a page that show to visitors anouncements of articles.And this page, which displays the announcements of articles, has the following template in a head
<head>
<title>[[*pagetitle]]</title>
<meta http-equiv="Content-Type" content="text/html; charset=[[++modx_charset]]" />
<meta http-equiv="Cache-Control" content="max-age=604800">
<meta name="Keywords" content="[[*tags]]"/>
<meta name="description" content="[[*description]]"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
next, I make a call to these announcements via getpage
[[!getPage? &element=`getResources` &parents=`710` &tpl=`insidetpl10` &elementClass=`modSnippet` &includeTVs=`1` &showHidden=`1` &limit=`10`]]
the insidetpl 10 template has the following code:
<div>
<h2>[[+pagetitle]]</h2>
</div>
<table style="width: 100%" class="anons">
<tr>
<a href="[[~[[+id]]]]"><img width="100%" height="100%" alt="[[+longtitle]]" src="[[+tv.image2]]"></a>
<p align="justify">[[+description]]</p> <p><strong><a class="content" href="[[~[[+id]]]]">ŠŠ¾Š“ŃŠ¾Š±Š½ŠµŠµ...</a></strong></p>
</table>
This displays article announcements with images and descriptions, and getpage itself displays 10 article announcements per page.
So, when there are so many articles that getpage begins to split the output into several pages, the problem arises that already on the second page, the title and description on the page 2 are the same
like on page 1.
For example:
sightinghs.html has code:
<head>
<title>Hello world</title>
<meta http-equiv="Content-Type" content="text/html; charset=[[++modx_charset]]" />
<meta http-equiv="Cache-Control" content="max-age=604800">
<meta name="Keywords" content="tag1, tag 2, tag3"/>
<meta name="description" content="The description"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
sightinghs.html?page=2 has the same code in title:
<head>
<title>Hello world</title>
<meta http-equiv="Content-Type" content="text/html; charset=[[++modx_charset]]" />
<meta http-equiv="Cache-Control" content="max-age=604800">
<meta name="Keywords" content="tag1, tag 2, tag3"/>
<meta name="description" content="The description"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
Search engines start swearing and saying that you have the same headlines on these pages. How to unify these headings when paginated? with this output, it is not added to the title on the second page, for example, that this is the second page, the third page, and so on, because in fact we are on the same page all the time, as I understand it. And the search engine sees it as different pages, and swears at the same title of 1 page of the announcement of articles and 2.