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

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

kakaeriel/cakephp-sitemap
=========================

Sitemap Generator plugin for CakePHP 3.x apps

1.1(8y ago)024MITPHPPHP &gt;=5.4.16

Since Jul 7Pushed 8y agoCompare

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

READMEChangelog (3)Dependencies (2)Versions (8)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 kakaeriel/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',
                ],
            ],
            'Products' => [
                'cacheKey' => 'sitemap',
                'finders' => 'all' => [
                    'conditions' => ['Products.is_active' => 1]
                ],
                'xmlTags'=> [
                    'loc' => ['products', ['field' => 'slug']], // generated => /products/:slug | /products/samsung-galaxy-s8
                    '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

        http://example.com/products/samsung-galaxy-s8
        0.9
        always

        http://example.com/products/macbook-air
        0.9
        always

```

Credits
-------

[](#credits)

This work is based on the \[code by CWB IT\] ().

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 54.5% 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 ~95 days

Recently: every ~140 days

Total

7

Last Release

3028d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f800e6cf404a2ca38c07902d49a71f26e1f594d4cf2f0661bc271c23f09545f0?d=identicon)[kakaeriel](/maintainers/kakaeriel)

---

Top Contributors

[![kakaeriel](https://avatars.githubusercontent.com/u/1411753?v=4)](https://github.com/kakaeriel "kakaeriel (6 commits)")[![cwbit](https://avatars.githubusercontent.com/u/6501207?v=4)](https://github.com/cwbit "cwbit (5 commits)")

---

Tags

cakephpSitemap

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/kakaeriel-cakephp-sitemap/health.svg)](https://phpackages.com/packages/kakaeriel-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)[cakedc/tiny-mce

TinyMCE Plugin for CakePHP

10790.2k](/packages/cakedc-tiny-mce)[loadsys/cakephp_sitemap

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

2819.6k](/packages/loadsys-cakephp-sitemap)[dereuromark/cakephp-dto

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

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

PHPackages © 2026

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