PHPackages                             kokspflanze/zfc-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. [Framework](/categories/framework)
4. /
5. kokspflanze/zfc-sitemap

ActiveLibrary[Framework](/categories/framework)

kokspflanze/zfc-sitemap
=======================

Sitemap module for Laminas, based on zend-navigation with eventmanager

0.4(5y ago)31.2kMITPHPPHP ^7.1.0

Since Oct 23Pushed 2y ago2 watchersCompare

[ Source](https://github.com/kokspflanze/ZfcSitemap)[ Packagist](https://packagist.org/packages/kokspflanze/zfc-sitemap)[ Docs](https://github.com/kokspflanze/ZfcSitemap)[ RSS](/packages/kokspflanze-zfc-sitemap/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (9)Versions (7)Used By (0)

ZfcSitemap Module for Laminas
=============================

[](#zfcsitemap-module-for-laminas)

SYSTEM REQUIREMENTS
-------------------

[](#system-requirements)

- requires PHP 7.1 or later; we recommend using the latest PHP version whenever possible.
- you have to use `laminas-navigation`

INSTALLATION
------------

[](#installation)

### Composer

[](#composer)

Installation of this module uses composer. For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).

```
php composer.phar require kokspflanze/zfc-sitemap
# (When asked for a version, type `dev-master`)
```

Go to `config/application.config.php` and add `ZfcSitemap` in the modules section.

How to use
----------

[](#how-to-use)

### Get the sitemap

[](#get-the-sitemap)

you can see your current sitemap with `/sitemap.xml`

### Create a sitemap as cache (optional)

[](#create-a-sitemap-as-cache-optional)

This create a sitemap in `data/zfc-sitemap` as cache, this means, if you call `/sitemap.xml` it will not longer create a new sitemap, it will use the cached sitemap.

For this you need to install `laminas/laminas-mvc-console` and this directory `data/zfc-sitemap` with write rights.

Than you can execute `php public/index.php generate-sitemap http://example.com` to create your sitemap. PS: You have to rerun it to create a new sitemap.

### Change your sitemap

[](#change-your-sitemap)

If you have dynamic pages on your page and you want to add them in the sitemap. You can add them with the EventManager.

#### Create a listener

[](#create-a-listener)

create a new class

```
