PHPackages                             loadsys/cakephp\_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. loadsys/cakephp\_sitemap

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

loadsys/cakephp\_sitemap
========================

A CakePHP Plugin for adding automatic XML and HTML Sitemaps to an app

3.1.0(8y ago)2819.6k15[4 issues](https://github.com/loadsys/CakePHP-Sitemap/issues)[1 PRs](https://github.com/loadsys/CakePHP-Sitemap/pulls)MITPHPPHP &gt;=5.6.0CI failing

Since Feb 18Pushed 6y ago11 watchersCompare

[ Source](https://github.com/loadsys/CakePHP-Sitemap)[ Packagist](https://packagist.org/packages/loadsys/cakephp_sitemap)[ Docs](https://github.com/loadsys/CakePHP-Sitemap)[ RSS](/packages/loadsys-cakephp-sitemap/feed)WikiDiscussions dev Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (9)Used By (0)

CakePHP-Sitemap
===============

[](#cakephp-sitemap)

[![Latest Version](https://camo.githubusercontent.com/0195ed245345ae99546f1effae6f811da35b6c66d904b927ad5b546c2354acef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6c6f61647379732f43616b655048502d536974656d61702e7376673f7374796c653d666c61742d737175617265)](https://github.com/loadsys/CakePHP-Sitemap/releases)[![Build Status](https://camo.githubusercontent.com/e3efd59ad92b92942a99615590392e1b941ce9d04114f9805a7575ef234effab/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c6f61647379732f43616b655048502d536974656d61702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/loadsys/CakePHP-Sitemap)[![Coverage Status](https://camo.githubusercontent.com/c02d297e6bb887ea60f2b7fd694a188557e15e3bdb87f9e697174c7695a3c6e6/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6c6f61647379732f43616b655048502d536974656d61702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/loadsys/CakePHP-Sitemap)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/62e76deff7f7f66205c4f1ff5cbd2aeff6b12c1383d763e0fa19772f9b07fd55/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6f61647379732f63616b657068705f736974656d61702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/loadsys/cakephp_sitemap)

The Sitemap provides a mechanism for displaying Sitemap style information (the url, change frequency, priority and last modified datetime) for a set of Tables that CakePHP has access to.

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

[](#requirements)

- CakePHP 3.0.0+
- PHP 5.6+

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

[](#installation)

```
$ composer require loadsys/cakephp_sitemap
```

In your `config/bootstrap.php` file, add:

```
Plugin::load('Sitemap', ['bootstrap' => false, 'routes' => true]);
```

OR

```
$ bin/cake plugin load Sitemap -r
```

Usage
-----

[](#usage)

- Add list of tables to display Sitemap records via an array at `Sitemap.tables`

```
Configure::write('Sitemap.tables', [
	'Pages',
	'Sites',
	'Camps',
]);
```

- Add the `Sitemap.Sitemap` Behavior to each table as well

```
$this->addBehavior('Sitemap.Sitemap');
```

You can now access the sitemap at `/sitemap.xml`.

### Configuration

[](#configuration)

- Default configuration options for the `Sitemap` Behavior is:

```
'cacheConfigKey' => 'default',
'lastmod' => 'modified',
'changefreq' => 'daily',
'priority' => '0.9',
'conditions' => [],
'order' => [],
'fields' => [],
'implementedMethods' => [
	'getUrl' => 'returnUrlForEntity',
],
'implementedFinders' => [
	'forSitemap' => 'findSitemapRecords',
],
```

- To modify these options for instance to change the `changefreq` when listing records, update the `addBehavior` method call for the `Table` in question like so:

```
$this->addBehavior('Sitemap.Sitemap', ['changefreq' => 'weekly']);
```

- To customize the url generated for each record create a method named `getUrl` in the matching `Table` class.

```
public function getUrl(\Cake\ORM\Entity $entity) {
	return \Cake\Routing\Router::url(
		[
			'prefix' => false,
			'plugin' => false,
			'controller' => $this->registryAlias(),
			'action' => 'display',
			$entity->display_id,
		],
		true
	);
}
```

- To customize the templates used when displaying the Sitemap, the CakePHP Book provides information regarding [overriding Plugin Templates](http://book.cakephp.org/3.0/en/plugins.html#overriding-plugin-templates-from-inside-your-application).

Contributing
------------

[](#contributing)

### Code of Conduct

[](#code-of-conduct)

This project has adopted the Contributor Covenant as its [code of conduct](CODE_OF_CONDUCT.md). All contributors are expected to adhere to this code. [Translations are available](http://contributor-covenant.org/).

### Reporting Issues

[](#reporting-issues)

Please use [GitHub Isuses](https://github.com/loadsys/CakePHP-Sitemap/issues) for listing any known defects or issues.

### Development

[](#development)

When developing this plugin, please fork and issue a PR for any new development.

Set up a working copy:

```
$ git clone git@github.com:YOUR_USERNAME/CakePHP-Sitemap.git
$ cd CakePHP-Sitemap/
$ composer install
$ vendor/bin/phpcs --config-set installed_paths vendor/loadsys/loadsys_codesniffer,vendor/cakephp/cakephp-codesniffer
```

Make your changes:

```
$ git checkout -b your-topic-branch
# (Make your changes. Write some tests.)
$ vendor/bin/phpunit
$ vendor/bin/phpcs -p --extensions=php --standard=Loadsys ./src ./tests
```

Then commit and push your changes to your fork, and open a pull request.

License
-------

[](#license)

[MIT](https://github.com/loadsys/CakePHP-Sitemap/blob/master/LICENSE.md)

Copyright
---------

[](#copyright)

[Loadsys Web Strategies](http://www.loadsys.com) 2016

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 91.4% 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 ~246 days

Total

6

Last Release

3239d ago

Major Versions

1.0.2 → 3.0.02016-05-26

PHP version history (2 changes)1.0PHP &gt;=5.3.0

3.0.0PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/58c6913a72757502a801ebc71f995eb1c4f7a53a7de7314a20b9a1f1d6131b60?d=identicon)[jtyost2](/maintainers/jtyost2)

![](https://www.gravatar.com/avatar/2380c6ad9546e6c8ce5c5b641f5a4bce0c4d3e7f3a377dc287936dff50cc3064?d=identicon)[ricog](/maintainers/ricog)

---

Top Contributors

[![justinyost](https://avatars.githubusercontent.com/u/85320?v=4)](https://github.com/justinyost "justinyost (96 commits)")[![ricog](https://avatars.githubusercontent.com/u/66134?v=4)](https://github.com/ricog "ricog (4 commits)")[![elboletaire](https://avatars.githubusercontent.com/u/153305?v=4)](https://github.com/elboletaire "elboletaire (2 commits)")[![kriskd](https://avatars.githubusercontent.com/u/193937?v=4)](https://github.com/kriskd "kriskd (2 commits)")[![davidyell](https://avatars.githubusercontent.com/u/49889?v=4)](https://github.com/davidyell "davidyell (1 commits)")

---

Tags

cakephpSitemap

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/loadsys-cakephp-sitemap/health.svg)

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

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

338920.1k32](/packages/dereuromark-cakephp-tools)[markstory/asset_compress

An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

3761.0M11](/packages/markstory-asset-compress)[dereuromark/cakephp-shim

A CakePHP plugin to shim applications between major framework versions.

401.0M11](/packages/dereuromark-cakephp-shim)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

2988.9k3](/packages/dereuromark-cakephp-dto)[dereuromark/cakephp-geo

A CakePHP plugin around geocoding tools and helpers.

51174.9k4](/packages/dereuromark-cakephp-geo)[cakedc/enum

Enumeration list Plugin for CakePHP 5

30222.5k2](/packages/cakedc-enum)

PHPackages © 2026

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