Download the PHP package adnan0703/sitemap without Composer
On this page you can find all versions of the php package adnan0703/sitemap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download adnan0703/sitemap
More information about adnan0703/sitemap
Files in adnan0703/sitemap
Package sitemap
Short Description Sitemap plugin for CakePHP
License MIT
Homepage https://github.com/Adnan0703/sitemap
Informations about the package sitemap
Sitemap plugin for CakePHP
The Sitemap plugin is a CakePHP wrapper around Cartographer library. It makes it very easy to generate sitemap. The Sitemap plugin can handle Sitemaps of more than 50,000 entries. Also it iterates over table records instead of retrieving all records at once.
Requirements
- PHP 5.4+
- CakePHP 3.0
- Cartographer Library (included as composer dependency)
Installation
You can install this plugin into your CakePHP application using composer.
How to use it
For example if you want to generate sitemap of Posts model, you need to define sitemapQuery
method in Posts table class
and sitemapEntry
virtual property in entity class of Posts model. The sitemapQuery
method must return Query
object and
sitemapEntry
must be an array
containing at least url
key.
With sitemapQuery
method you can control records that will be added to sitemap and with sitemapEntry
virtual property
you can control properties of sitemap entry.
Now we can generate sitemap of Posts model as shown in code below.
You can also add Pages controller urls and other urls in sitemap.
Configuration Options
Sitemap plugin has two configuration options.
Sitemap.pages
and Sitemap.findLimit
. Sitemap.pages
option has been explained above. With Sitemap.findLimit
you can
limit the number of records Sitemap retrieves at a time while iterating over table.
Support
For bugs and feature requests, please use the issues section of this repository.
Contributing to this Plugin
Please feel free to contribute to the plugin with new issues, requests, unit tests and code fixes or new features.
License
Copyright 2015, Adnan Aslam
Licensed under The MIT License Redistributions of files must retain the above copyright notice.
All versions of sitemap with dependencies
cakephp/cakephp Version ~3.0
league/flysystem Version 0.4.*
tackk/cartographer Version 1.0.*