xref: /webtrees/resources/views/modules/sitemap/sitemap-index-xml.phtml (revision 2145828ba5a1541af8ce5bc9c55659f079a30406)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
4use Fisharebest\Webtrees\Family;
5use Fisharebest\Webtrees\Individual;
6use Fisharebest\Webtrees\Media;
7use Fisharebest\Webtrees\Note;
8use Fisharebest\Webtrees\Repository;
9use Fisharebest\Webtrees\Source;
10use Fisharebest\Webtrees\Submitter;
11
12/**
13 * @var string $sitemap_xsl
14 */
15
16?>
17<<?php /* Beware short open tags in PHP <8.0 */ ?>?xml version="1.0" encoding="UTF-8"?>
18<<?php /* Beware short open tags in PHP <8.0 */ ?>?xml-stylesheet type="text/xsl" href="<?= e($sitemap_xsl) ?>"?>
19<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
20
21    <?php foreach ($count_families as $tree_name => $count) : ?>
22    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
23    <sitemap>
24        <loc>
25            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Family::RECORD_TYPE, 'page' => $i])) ?>
26        </loc>
27        <lastmod>
28            <?= $last_mod ?>
29        </lastmod>
30    </sitemap>
31    <?php endfor ?>
32    <?php endforeach ?>
33
34    <?php foreach ($count_individuals as $tree_name => $count) : ?>
35    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
36    <sitemap>
37        <loc>
38            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Individual::RECORD_TYPE, 'page' => $i])) ?>
39        </loc>
40        <lastmod>
41            <?= $last_mod ?>
42        </lastmod>
43    </sitemap>
44    <?php endfor ?>
45    <?php endforeach ?>
46
47    <?php foreach ($count_media as $tree_name => $count) : ?>
48    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
49    <sitemap>
50        <loc>
51            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Media::RECORD_TYPE, 'page' => $i])) ?>
52        </loc>
53        <lastmod>
54            <?= $last_mod ?>
55        </lastmod>
56    </sitemap>
57    <?php endfor ?>
58    <?php endforeach ?>
59
60    <?php foreach ($count_notes as $tree_name => $count) : ?>
61    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
62    <sitemap>
63        <loc>
64            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Note::RECORD_TYPE, 'page' => $i])) ?>
65        </loc>
66        <lastmod>
67            <?= $last_mod ?>
68        </lastmod>
69    </sitemap>
70    <?php endfor ?>
71    <?php endforeach ?>
72
73    <?php foreach ($count_repositories as $tree_name => $count) : ?>
74    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
75    <sitemap>
76        <loc>
77            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Repository::RECORD_TYPE, 'page' => $i])) ?>
78        </loc>
79        <lastmod>
80            <?= $last_mod ?>
81        </lastmod>
82    </sitemap>
83    <?php endfor ?>
84    <?php endforeach ?>
85
86    <?php foreach ($count_sources as $tree_name => $count) : ?>
87    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
88    <sitemap>
89        <loc>
90            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Source::RECORD_TYPE, 'page' => $i])) ?>
91        </loc>
92        <lastmod>
93            <?= $last_mod ?>
94        </lastmod>
95    </sitemap>
96    <?php endfor ?>
97    <?php endforeach ?>
98
99    <?php foreach ($count_submitters as $tree_name => $count) : ?>
100    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
101    <sitemap>
102        <loc>
103            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Submitter::RECORD_TYPE, 'page' => $i])) ?>
104        </loc>
105        <lastmod>
106            <?= $last_mod ?>
107        </lastmod>
108    </sitemap>
109    <?php endfor ?>
110    <?php endforeach ?>
111</sitemapindex>
112