xref: /webtrees/resources/views/modules/sitemap/sitemap-index-xml.phtml (revision 0a2e4c5c277259789bade645f717de25295e52f3)
114aabe72SGreg Roach<?php
214aabe72SGreg Roach
3c5a1ffe6SGreg Roachuse Fisharebest\Webtrees\Family;
414aabe72SGreg Roachuse Fisharebest\Webtrees\Individual;
514aabe72SGreg Roachuse Fisharebest\Webtrees\Media;
614aabe72SGreg Roachuse Fisharebest\Webtrees\Note;
714aabe72SGreg Roachuse Fisharebest\Webtrees\Repository;
8c5a1ffe6SGreg Roachuse Fisharebest\Webtrees\Source;
9c5a1ffe6SGreg Roachuse Fisharebest\Webtrees\Submitter;
10*0a2e4c5cSGreg Roachuse Illuminate\Support\Collection;
1114aabe72SGreg Roach
1214aabe72SGreg Roach/**
13*0a2e4c5cSGreg Roach * @var Collection<string,int> $count_families
14*0a2e4c5cSGreg Roach * @var Collection<string,int> $count_individuals
15*0a2e4c5cSGreg Roach * @var Collection<string,int> $count_media
16*0a2e4c5cSGreg Roach * @var Collection<string,int> $count_notes
17*0a2e4c5cSGreg Roach * @var Collection<string,int> $count_repositories
18*0a2e4c5cSGreg Roach * @var Collection<string,int> $count_sources
19*0a2e4c5cSGreg Roach * @var Collection<string,int> $count_submitters
20*0a2e4c5cSGreg Roach * @var string                 $last_mod
21*0a2e4c5cSGreg Roach * @var int                    $records_per_volume
2214aabe72SGreg Roach * @var string                 $sitemap_xsl
2314aabe72SGreg Roach */
2414aabe72SGreg Roach
2514aabe72SGreg Roach?>
2614aabe72SGreg Roach<<?php /* Beware short open tags in PHP <8.0 */ ?>?xml version="1.0" encoding="UTF-8"?>
270800f024SGreg Roach<<?php /* Beware short open tags in PHP <8.0 */ ?>?xml-stylesheet type="text/xsl" href="<?= e($sitemap_xsl) ?>"?>
2814aabe72SGreg Roach<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
2914aabe72SGreg Roach
30c5a1ffe6SGreg Roach    <?php foreach ($count_families as $tree_name => $count) : ?>
31c5a1ffe6SGreg Roach    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
32c5a1ffe6SGreg Roach    <sitemap>
33c5a1ffe6SGreg Roach        <loc>
34c5a1ffe6SGreg Roach            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Family::RECORD_TYPE, 'page' => $i])) ?>
35c5a1ffe6SGreg Roach        </loc>
36c5a1ffe6SGreg Roach        <lastmod>
37c5a1ffe6SGreg Roach            <?= $last_mod ?>
38c5a1ffe6SGreg Roach        </lastmod>
39c5a1ffe6SGreg Roach    </sitemap>
40c5a1ffe6SGreg Roach    <?php endfor ?>
41c5a1ffe6SGreg Roach    <?php endforeach ?>
42c5a1ffe6SGreg Roach
4314aabe72SGreg Roach    <?php foreach ($count_individuals as $tree_name => $count) : ?>
4414aabe72SGreg Roach    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
4514aabe72SGreg Roach    <sitemap>
4614aabe72SGreg Roach        <loc>
47c5a1ffe6SGreg Roach            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Individual::RECORD_TYPE, 'page' => $i])) ?>
4814aabe72SGreg Roach        </loc>
4914aabe72SGreg Roach        <lastmod>
5014aabe72SGreg Roach            <?= $last_mod ?>
5114aabe72SGreg Roach        </lastmod>
5214aabe72SGreg Roach    </sitemap>
5314aabe72SGreg Roach    <?php endfor ?>
5414aabe72SGreg Roach    <?php endforeach ?>
5514aabe72SGreg Roach
5614aabe72SGreg Roach    <?php foreach ($count_media as $tree_name => $count) : ?>
5714aabe72SGreg Roach    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
5814aabe72SGreg Roach    <sitemap>
5914aabe72SGreg Roach        <loc>
60c5a1ffe6SGreg Roach            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Media::RECORD_TYPE, 'page' => $i])) ?>
6114aabe72SGreg Roach        </loc>
6214aabe72SGreg Roach        <lastmod>
6314aabe72SGreg Roach            <?= $last_mod ?>
6414aabe72SGreg Roach        </lastmod>
6514aabe72SGreg Roach    </sitemap>
6614aabe72SGreg Roach    <?php endfor ?>
6714aabe72SGreg Roach    <?php endforeach ?>
6814aabe72SGreg Roach
6914aabe72SGreg Roach    <?php foreach ($count_notes as $tree_name => $count) : ?>
7014aabe72SGreg Roach    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
7114aabe72SGreg Roach    <sitemap>
7214aabe72SGreg Roach        <loc>
73c5a1ffe6SGreg Roach            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Note::RECORD_TYPE, 'page' => $i])) ?>
7414aabe72SGreg Roach        </loc>
7514aabe72SGreg Roach        <lastmod>
7614aabe72SGreg Roach            <?= $last_mod ?>
7714aabe72SGreg Roach        </lastmod>
7814aabe72SGreg Roach    </sitemap>
7914aabe72SGreg Roach    <?php endfor ?>
8014aabe72SGreg Roach    <?php endforeach ?>
8114aabe72SGreg Roach
8214aabe72SGreg Roach    <?php foreach ($count_repositories as $tree_name => $count) : ?>
8314aabe72SGreg Roach    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
8414aabe72SGreg Roach    <sitemap>
8514aabe72SGreg Roach        <loc>
86c5a1ffe6SGreg Roach            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Repository::RECORD_TYPE, 'page' => $i])) ?>
8714aabe72SGreg Roach        </loc>
8814aabe72SGreg Roach        <lastmod>
8914aabe72SGreg Roach            <?= $last_mod ?>
9014aabe72SGreg Roach        </lastmod>
9114aabe72SGreg Roach    </sitemap>
9214aabe72SGreg Roach    <?php endfor ?>
9314aabe72SGreg Roach    <?php endforeach ?>
9414aabe72SGreg Roach
9514aabe72SGreg Roach    <?php foreach ($count_sources as $tree_name => $count) : ?>
9614aabe72SGreg Roach    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
9714aabe72SGreg Roach    <sitemap>
9814aabe72SGreg Roach        <loc>
99c5a1ffe6SGreg Roach            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Source::RECORD_TYPE, 'page' => $i])) ?>
100c5a1ffe6SGreg Roach        </loc>
101c5a1ffe6SGreg Roach        <lastmod>
102c5a1ffe6SGreg Roach            <?= $last_mod ?>
103c5a1ffe6SGreg Roach        </lastmod>
104c5a1ffe6SGreg Roach    </sitemap>
105c5a1ffe6SGreg Roach    <?php endfor ?>
106c5a1ffe6SGreg Roach    <?php endforeach ?>
107c5a1ffe6SGreg Roach
108c5a1ffe6SGreg Roach    <?php foreach ($count_submitters as $tree_name => $count) : ?>
109c5a1ffe6SGreg Roach    <?php for ($i = 0; $i <= $count / $records_per_volume; ++$i) : ?>
110c5a1ffe6SGreg Roach    <sitemap>
111c5a1ffe6SGreg Roach        <loc>
112c5a1ffe6SGreg Roach            <?= e(route('sitemap-file', ['tree' => $tree_name, 'type' => Submitter::RECORD_TYPE, 'page' => $i])) ?>
11314aabe72SGreg Roach        </loc>
11414aabe72SGreg Roach        <lastmod>
11514aabe72SGreg Roach            <?= $last_mod ?>
11614aabe72SGreg Roach        </lastmod>
11714aabe72SGreg Roach    </sitemap>
11814aabe72SGreg Roach    <?php endfor ?>
11914aabe72SGreg Roach    <?php endforeach ?>
12014aabe72SGreg Roach</sitemapindex>
121