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

ActiveCakephp-plugin

40katty04/cakephp-sitemap
=========================

Sitemap Generator plugin for CakePHP 4.x apps

3.0(5y ago)074MITPHPPHP &gt;=7.3

Since Jul 7Pushed 5y agoCompare

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

READMEChangelog (5)Dependencies (2)Versions (13)Used By (0)

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

[](#cakephp-sitemap)

Sitemap generator plugin for CakePHP 4.1 apps

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

[](#installation)

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

```
composer require 40katty04/cakephp-sitemap "~2.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

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 60.9% 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 ~160 days

Recently: every ~147 days

Total

11

Last Release

1988d ago

Major Versions

1.0.6 → 2.02020-09-27

2.2 → 3.02020-11-29

PHP version history (3 changes)1.0.0PHP &gt;=5.4.16

1.0.6PHP &gt;=7.0.16

2.2PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/75504df74c79d5f727500e918972c58f68126a393eb0e9604702193542b50217?d=identicon)[40katty04](/maintainers/40katty04)

---

Top Contributors

[![40katty04](https://avatars.githubusercontent.com/u/38152697?v=4)](https://github.com/40katty04 "40katty04 (14 commits)")[![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/40katty04-cakephp-sitemap/health.svg)

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

###  Alternatives

[friendsofcake/cakepdf

CakePHP plugin for creating and/or rendering Pdfs, several Pdf engines supported.

3752.1M3](/packages/friendsofcake-cakepdf)[cakephp/bake

Bake plugin for CakePHP

11211.2M156](/packages/cakephp-bake)[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

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

The Queue plugin for CakePHP provides deferred task execution.

308850.3k14](/packages/dereuromark-cakephp-queue)[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1862.1M26](/packages/dereuromark-cakephp-ide-helper)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

129228.6k10](/packages/dereuromark-cakephp-tinyauth)

PHPackages © 2026

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