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

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

mpinchuk/cakephp-sitemap
========================

Sitemap Generator plugin for CakePHP 3.x apps

1.0.5(7y ago)0411[1 PRs](https://github.com/mpinchuk/cakephp-sitemap/pulls)MITPHPPHP &gt;=5.4.16

Since Jul 7Pushed 5y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (7)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 mpinchuk/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' => [
                    'all' => [
		    	'condition' => [
			    'Categories.enabled' => true
			]
		    ],
                ],
                'xmlTags'=> [
                    'loc' => 'permalink',
                    'priority' => '0.9',
                    'changefreq' => 'always',
                ],
            ],
            'Products' => [
                'cacheKey' => 'sitemap',
                'finders' => [
                    'all' => [
		    	'condition' => [
			    'Products.enabled' => 'true',
			    function ($exp) {
                            	return $exp->notIn('Products.status',
				    [
				       'Stalled',
				       'Placed',
				       'Lost to Competition',
				       'Filled by Client',
				       'Cancelled'
				    ]);
                            }
			],
		    ],
                ],
                'xmlTags'=> [
                    'loc' => [
                    	'urlBody' => '/product',
                    	'queryParams' => ['productId' => 'id'] // queryParam => CollumnNameInDb
                    ],
                    '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?productId=45673
        0.9
        always

        http://example.com/product?productId=89654
        0.9
        always

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 55.6% 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 ~162 days

Recently: every ~202 days

Total

6

Last Release

2786d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

CakePHP plugin extension for PHPStan.

40676.6k31](/packages/cakedc-cakephp-phpstan)[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)

PHPackages © 2026

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