PHPackages                             cwbit/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. cwbit/cakephp-sitemap

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

cwbit/cakephp-sitemap
=====================

Sitemap Generator plugin for CakePHP 3.x apps

1.0.3(9y ago)21.9k5[2 issues](https://github.com/cwbit/cakephp-sitemap/issues)MITPHPPHP &gt;=5.4.16

Since Jul 7Pushed 7y ago1 watchersCompare

[ Source](https://github.com/cwbit/cakephp-sitemap)[ Packagist](https://packagist.org/packages/cwbit/cakephp-sitemap)[ RSS](/packages/cwbit-cakephp-sitemap/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

cakephp-sitemap
===============

[](#cakephp-sitemap)

Sitemap generator plugin for CakePHP 3x apps

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

[](#installation)

This package is available for easy installation through [Packagist](http://packagist.com)

```
composer require cwbit/cakephp-sitemap "~1.0"
```

Then make sure to load the plugin normally in your app. e.g.

```
# somewhere in config/bootstrap.php

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

Finally, set your configuration array (see below)

Configuration
-------------

[](#configuration)

The plugin will look for an array of info using `Configure::read('Sitemap')` so just make sure such an array is loaded during bootstrapping. The easiest way to do this is to add it to your `config/app.php` file.

There are two sections the plugin looks for `static` pages and `dynamic` pages.

### Static Pages

[](#static-pages)

Static pages are nested under `Sitemap.static` which expects an array of URLs. This can take any URL accepted by `Router::url()`.

```
	'Sitemap' =>
		'static' =>
			['_name' => 'pages:about'],
			'http://example.com/search',
			['controller'=>'Pages', 'action'=>'display', 'terms-of-service'],
```

### Dynamic Pages

[](#dynamic-pages)

You can dynamically create links by nesting a group of config settings under `Sitemap.dynamic`

```
	'Sitemap' =>
		'dynamic' =>
			'Items' =>  #the name of the model to get entities for
				'cachekey' => 'sitemap', 	# cachekey to use (e.g. from Configure::read('Cache.sitemap'))
				'finders' => [ .. ], 		# array of model-layer finders for getting entities
				'xmlTags' =>				# xml tags to output with each sitemap line
					'loc' => 'url'				# default 'url'; entity attribute name, or array, or string
					'priority' => 0.5			# default 0.5; 0 to 1 priority
					'lastmod' => 'updated'		# default 'updated'; entity attribute giving lastmod time
					'changefreq' => 'daily'		# default 'daily'; always, hourly, daily, weekly, yearly, never

```

Example Configuration
---------------------

[](#example-configuration)

Here's a sample configuration straight from one of the projects using this plugin

```
	# .. in config/app.php
	...,
    'Sitemap' => [
        'static' => [
            ['_name' => 'user-register'],
            ['_name' => 'user-resetpw'],
            ['_name' => 'user-login'],
            ['_name' => 'user-logout'],
            ['_name' => 'user-dashboard'],
            ['_name' => 'privacy'],
            ["_name" => "contact-us"],
            ["_name" => "rewards"],
            ["_name" => "terms-of-service"],
            ["_name" => "about-us"],
            ["_name" => "search"],
        ],
        'dynamic' => [
            'Categories' => [
                'cacheKey' => 'sitemap',
                'finders' => [
                    'visible' => [],
                    ],
                'xmlTags'=> [
                    'loc' => 'url',
                    'priority' => '0.9',
                    'changefreq' => 'always',
                ],
            ],
            'Items' => [
                'cacheKey' => 'sitemap',
                'finders' => [
                    'visible' => [],
                    ],
                'xmlTags'=> [
                    'loc' => 'permalink',
                    'priority' => '0.9',
                    'changefreq' => 'always',
                ],
            ],
        ],
    ],
```

which produces the following

```

        http://example.com/
        always
        1.0

        http://example.com/register
        0.5
        weekly

        http://example.com/reset-password
        0.5
        weekly

        http://example.com/login
        0.5
        weekly

        http://example.com/logout
        0.5
        weekly

        http://example.com/my-account
        0.5
        weekly

        http://example.com/privacy
        0.5
        weekly

        http://example.com/contact-us
        0.5
        weekly

        http://example.com/rewards
        0.5
        weekly

        http://example.com/terms-of-service
        0.5
        weekly

        http://example.com/about-us
        0.5
        weekly

        http://example.com/search/
        0.5
        weekly

        http://example.com/product/spice-widgets
        0.9
        always

        http://example.com/product/posh-widgets
        0.9
        always

        http://example.com/product/spice-widgets/cayenne
        0.9
        always

        http://example.com/product/posh-widgets/foobar
        0.9
        always

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~3 days

Total

4

Last Release

3633d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/474fb8a03f077a57b5421dcc5b93a8c30f16e0ecbf0f17a239e46a0ebd8ab5f7?d=identicon)[cwbit](/maintainers/cwbit)

---

Top Contributors

[![cwbit](https://avatars.githubusercontent.com/u/6501207?v=4)](https://github.com/cwbit "cwbit (6 commits)")[![rioastamal](https://avatars.githubusercontent.com/u/469847?v=4)](https://github.com/rioastamal "rioastamal (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

333972.2k49](/packages/dereuromark-cakephp-tools)[cakedc/cakephp-phpstan

CakePHP plugin extension for PHPStan.

42776.5k46](/packages/cakedc-cakephp-phpstan)[dereuromark/cakephp-dto

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

3096.0k5](/packages/dereuromark-cakephp-dto)[dereuromark/cakephp-setup

A CakePHP plugin containing lots of useful management tools

35184.7k2](/packages/dereuromark-cakephp-setup)[dereuromark/cakephp-calendar

A CakePHP plugin to easily create calendars.

1674.7k1](/packages/dereuromark-cakephp-calendar)[dereuromark/cakephp-flash

A CakePHP plugin around powerful flash message handling.

1229.9k2](/packages/dereuromark-cakephp-flash)

PHPackages © 2026

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