{"id":19571747,"url":"https://github.com/loadsys/cakephp-sitemap","last_synced_at":"2025-10-24T18:39:39.385Z","repository":{"id":11274686,"uuid":"13681542","full_name":"loadsys/CakePHP-Sitemap","owner":"loadsys","description":"Generate HTML and XML sitemaps for your CakePHP application.","archived":false,"fork":false,"pushed_at":"2019-12-07T13:12:22.000Z","size":81,"stargazers_count":26,"open_issues_count":7,"forks_count":14,"subscribers_count":11,"default_branch":"dev","last_synced_at":"2025-10-01T16:38:28.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loadsys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-18T15:21:49.000Z","updated_at":"2025-09-22T18:28:58.000Z","dependencies_parsed_at":"2022-08-31T09:11:29.242Z","dependency_job_id":null,"html_url":"https://github.com/loadsys/CakePHP-Sitemap","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/loadsys/CakePHP-Sitemap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-Sitemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-Sitemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-Sitemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-Sitemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loadsys","download_url":"https://codeload.github.com/loadsys/CakePHP-Sitemap/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loadsys%2FCakePHP-Sitemap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280848063,"owners_count":26401735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T06:19:55.321Z","updated_at":"2025-10-24T18:39:39.365Z","avatar_url":"https://github.com/loadsys.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CakePHP-Sitemap\n\n[![Latest Version](https://img.shields.io/github/release/loadsys/CakePHP-Sitemap.svg?style=flat-square)](https://github.com/loadsys/CakePHP-Sitemap/releases)\n[![Build Status](https://img.shields.io/travis/loadsys/CakePHP-Sitemap/master.svg?style=flat-square)](https://travis-ci.org/loadsys/CakePHP-Sitemap)\n[![Coverage Status](https://img.shields.io/coveralls/loadsys/CakePHP-Sitemap/master.svg?style=flat-square)](https://coveralls.io/r/loadsys/CakePHP-Sitemap)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Total Downloads](https://img.shields.io/packagist/dt/loadsys/cakephp_sitemap.svg?style=flat-square)](https://packagist.org/packages/loadsys/cakephp_sitemap)\n\nThe 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.\n\n\n## Requirements\n\n* CakePHP 3.0.0+\n* PHP 5.6+\n\n\n## Installation\n\n```shell\n$ composer require loadsys/cakephp_sitemap\n```\n\nIn your `config/bootstrap.php` file, add:\n\n```php\nPlugin::load('Sitemap', ['bootstrap' =\u003e false, 'routes' =\u003e true]);\n```\n\nOR\n\n```shell\n$ bin/cake plugin load Sitemap -r\n```\n\n## Usage\n\n* Add list of tables to display Sitemap records via an array at `Sitemap.tables`\n\n```php\nConfigure::write('Sitemap.tables', [\n\t'Pages',\n\t'Sites',\n\t'Camps',\n]);\n```\n\n* Add the `Sitemap.Sitemap` Behavior to each table as well\n\n```php\n$this-\u003eaddBehavior('Sitemap.Sitemap');\n```\n\nYou can now access the sitemap at `/sitemap.xml`.\n\n### Configuration\n\n* Default configuration options for the `Sitemap` Behavior is:\n\n```php\n'cacheConfigKey' =\u003e 'default',\n'lastmod' =\u003e 'modified',\n'changefreq' =\u003e 'daily',\n'priority' =\u003e '0.9',\n'conditions' =\u003e [],\n'order' =\u003e [],\n'fields' =\u003e [],\n'implementedMethods' =\u003e [\n\t'getUrl' =\u003e 'returnUrlForEntity',\n],\n'implementedFinders' =\u003e [\n\t'forSitemap' =\u003e 'findSitemapRecords',\n],\n```\n\n* 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:\n\n```php\n$this-\u003eaddBehavior('Sitemap.Sitemap', ['changefreq' =\u003e 'weekly']);\n```\n\n* To customize the url generated for each record create a method named `getUrl` in the matching `Table` class.\n\n```php\npublic function getUrl(\\Cake\\ORM\\Entity $entity) {\n\treturn \\Cake\\Routing\\Router::url(\n\t\t[\n\t\t\t'prefix' =\u003e false,\n\t\t\t'plugin' =\u003e false,\n\t\t\t'controller' =\u003e $this-\u003eregistryAlias(),\n\t\t\t'action' =\u003e 'display',\n\t\t\t$entity-\u003edisplay_id,\n\t\t],\n\t\ttrue\n\t);\n}\n```\n\n* 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).\n\n## Contributing\n\n### Code of Conduct\n\nThis 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/).\n\n### Reporting Issues\n\nPlease use [GitHub Isuses](https://github.com/loadsys/CakePHP-Sitemap/issues) for listing any known defects or issues.\n\n### Development\n\nWhen developing this plugin, please fork and issue a PR for any new development.\n\nSet up a working copy:\n```shell\n$ git clone git@github.com:YOUR_USERNAME/CakePHP-Sitemap.git\n$ cd CakePHP-Sitemap/\n$ composer install\n$ vendor/bin/phpcs --config-set installed_paths vendor/loadsys/loadsys_codesniffer,vendor/cakephp/cakephp-codesniffer\n```\n\nMake your changes:\n```shell\n$ git checkout -b your-topic-branch\n# (Make your changes. Write some tests.)\n$ vendor/bin/phpunit\n$ vendor/bin/phpcs -p --extensions=php --standard=Loadsys ./src ./tests\n```\n\nThen commit and push your changes to your fork, and open a pull request.\n\n\n## License\n\n[MIT](https://github.com/loadsys/CakePHP-Sitemap/blob/master/LICENSE.md)\n\n\n## Copyright\n\n[Loadsys Web Strategies](http://www.loadsys.com) 2016\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floadsys%2Fcakephp-sitemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floadsys%2Fcakephp-sitemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floadsys%2Fcakephp-sitemap/lists"}