PHPackages                             axllent/silverstripe-sitemap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. axllent/silverstripe-sitemap

AbandonedArchivedSilverstripe-module[Utility &amp; Helpers](/categories/utility)

axllent/silverstripe-sitemap
============================

Sitemap support SilverStripe

1.0.2(8y ago)142The MIT License (MIT)PHP

Since Dec 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/axllent/silverstripe-sitemap)[ Packagist](https://packagist.org/packages/axllent/silverstripe-sitemap)[ Docs](https://github.com/axllent/silverstripe-sitemap)[ RSS](/packages/axllent-silverstripe-sitemap/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Sitemap generator for SilverStripe 3
====================================

[](#sitemap-generator-for-silverstripe-3)

This extension adds sitemap functionality to your SilverStripe website. It is heavily based on [googlesitemaps](https://github.com/silverstripe-labs/silverstripe-googlesitemaps), however does things a little differently, adding in support for basic custom filters when adding DataObjects, and removing some CMS integration, pagination of results, and JavaScript support. The sitemap is hard-coded to have a maximum of 1000 dataobjects per sitemap (due to memory use), and will automatically split your sitemaps into multiple if there are more.

Requirements
------------

[](#requirements)

- SilverStripe 3.0+

Installation
------------

[](#installation)

```
composer require axllent/silverstripe-sitemap

```

Basic usage
-----------

[](#basic-usage)

Simply install the module. To check the sitemap is working, go to `http://yoursite.com/sitemap.xml?flush=1`. By default it will add your SiteTree pages (with "show in search" enabled), however you can also optionally add DataObjects provided they are mapped to URLs.

Specifying the Sitemap location in your robots.txt file
-------------------------------------------------------

[](#specifying-the-sitemap-location-in-your-robotstxt-file)

```
Sitemap: http://yoursite.com/sitemap.xml

```

Adding DataObjects
------------------

[](#adding-dataobjects)

DataObjects can easily be added too, assuming of course that those DataObjects have unique URLs on your site. DatObjects must either have a `Link()` function, or alternatively have a `SitemapAbsoluteURL()` function (which will override `Link()`). The `SitemapAbsoluteURL()` function must return an absolute URL, `Link()` will get automatically converted.

To add a DataObject to your sitemap you can simply add the following to your `mysite/_config.php`:

```
Sitemap::register_dataobject('MyDataObject');
```

Additional options are available:

```
Sitemap::register_dataobject('MyDataObject', array(
	'filter' => array('ShowOnWeb' => 1),
	'where' => '"ExpiryDate" >= \'' . date('Y-m-d') . '\' OR "ExpiryDate" IS NULL',
	'exclude' => array('StockLevel' => 0),
	'filterByCallback' => function($dataobject, $list) {return $dataobject->canView();}
	'frequency' => 'weekly', // always, hourly, daily, weekly, monthly, yearly, never
	'priority' => 0.5 // Valid values range from 0.0 to 1.0
));
```

Google Notifications
--------------------

[](#google-notifications)

Publishing &amp; unpublishing of SiteTree pages can automatically send a "ping" to Google. Please note that this is turned off by default and does not apply to saving of DataObjects. Also note that you must have registered your sitemap with Google's webmaster tools first.

To enable change notifications to Google:

```
Sitemap::enable_google_notifications();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~361 days

Total

3

Last Release

3071d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1463435?v=4)[Ralph Slooten](/maintainers/axllent)[@axllent](https://github.com/axllent)

---

Top Contributors

[![axllent](https://avatars.githubusercontent.com/u/1463435?v=4)](https://github.com/axllent "axllent (18 commits)")

---

Tags

googlesilverstripeSitemapseo

### Embed Badge

![Health badge](/badges/axllent-silverstripe-sitemap/health.svg)

```
[![Health](https://phpackages.com/badges/axllent-silverstripe-sitemap/health.svg)](https://phpackages.com/packages/axllent-silverstripe-sitemap)
```

###  Alternatives

[hubertusanton/silverstripe-seo

SEO module for Silverstripe

4823.0k2](/packages/hubertusanton-silverstripe-seo)[asika/sitemap

PHP Simple Sitemap Generator

1918.0k](/packages/asika-sitemap)[axllent/silverstripe-trailing-slash

Ensure that a single trailing slash is always added to the URL

11182.6k5](/packages/axllent-silverstripe-trailing-slash)[silverstripers/seo

SEO for SilverStripe websites

1144.3k](/packages/silverstripers-seo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
