[FEATURE] Add properties changefreq and priority to XML sitemap entries
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Feature-87433-AddChangefreqAndPriority.rst
1 .. include:: ../../Includes.txt
2
3 =============================================
4 Feature: #87433 - Add changefreq and priority
5 =============================================
6
7 See :issue:`87433`
8
9 Description
10 ===========
11
12 Sitemap.xml files may contain a change frequency and a priority for entries.
13
14 Change frequencies define how often each page is approximately updated and hence how often it should be
15 revisited (for example: News in an archive are "never" updated, while your home page might get "weekly" updates).
16
17 Priority allows you to define how important the page is compared to other pages on your site. The priority is stated
18 in a value from 0 to 1. Your most important pages can get an higher priority as other pages. This value does not
19 affect how your pages are compared to pages of other websites.
20
21 This feature allows to define the properties `changefreq` and `priority` for sitemap entries in TYPO3.
22
23 The properties `changefreq` and `priority` of pages can be controlled via page properties.
24 For records, the settings can be defined in TypoScript by mapping the properties to fields of the record by
25 using the options `changeFreqField` and `priorityField`. `changeFreqField` needs to point to a field containing
26 string values (see `pages` definition of field `sitemap_changefreq`), `priorityField` needs to point to a field with
27 a decimal value between 0 and 1.
28
29
30 .. code-block:: typoscript
31
32 plugin.tx_seo {
33 config {
34 xmlSitemap {
35 sitemaps {
36 <unique key> {
37 provider = TYPO3\CMS\Seo\XmlSitemap\RecordsXmlSitemapDataProvider
38 config {
39 table = news_table
40 sortField = sorting
41 lastModifiedField = tstamp
42 changeFreqField = news_changefreq
43 priorityField = news_priority
44 additionalWhere = AND (no_index = 0 OR no_follow = 0)
45 pid = <page id('s) containing news records>
46 url {
47 pageId = <your detail page id>
48 fieldToParameterMap {
49 uid = tx_extension_pi1[news]
50 }
51 additionalGetParameters {
52 tx_extension_pi1.controller = News
53 tx_extension_pi1.action = detail
54 }
55 useCacheHash = 1
56 }
57 }
58 }
59 }
60 }
61 }
62 }
63
64
65 Impact
66 ======
67
68 Two new fields are available in the page properties: `sitemap_priority` (decimal) and `sitemap_changefreq` (list of values, for example "weekly", "daily", "never").
69
70 Two new TypoScript options for the `RecordsXmlSitemapDataProvider` have been introduced:
71 `changeFreqField` and `priorityField`.
72
73 All pages and records get a priority of 0.5 by default.
74
75 .. attention::
76 Both priority and change frequency does have no impact on your rankings. These options only gives hints to search engines
77 in which order and how often you would like a crawler to crawl your pages.
78
79 .. index:: ext:seo