PHPackages                             jlaso/sitemap-bundle - 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. jlaso/sitemap-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

jlaso/sitemap-bundle
====================

Sitemap Bundle for Symfony2 based on https://github.com/ouardisoft/SitemapBundle

040PHP

Since Nov 14Pushed 7y ago2 watchersCompare

[ Source](https://github.com/jlaso/sitemap-bundle)[ Packagist](https://packagist.org/packages/jlaso/sitemap-bundle)[ RSS](/packages/jlaso-sitemap-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Sitemap-bundle based on

Installation using github
=========================

[](#installation-using-github)

in your composer.json file add this lines

```
    "repositories": [
        ...
        {
            "type": "git",
            "url":  "https://github.com/jlaso/sitemap-bundle.git"
        }
        ...
    ],
    "require": {
        ...
        "jlaso/sitemap-bundle": "1.0.*@dev",
        ...
    }

```

Add in your file app/AppKernel.php

```
    ...
    public function registerBundles() {
       $bundles = array(
            ...
            new Jlaso\SitemapBundle\JlasoSitemapBundle(),
            ...
    }

```

Configuration
=============

[](#configuration)

params
------

[](#params)

- **path**: this is path where you want to save sitemap file
- **entity**: Use this entity to generate my file
- **loc**: this is a sitemap tag. we can use our route to generate link.
- **lastmod**: use this param to generate lastmod tag
- **priority**: priority

example
-------

[](#example)

```
 jlaso_sitemap:
     path: "%kernel.root_dir%/../web/sitemap.xml"
     items:
        Post:
             entity: AppCoreBundle:Post
                 loc: {route: _post, params: {post_id: id, title: slug}}
                 lastmod: updatedAt
                 priority: 0.5

 ; with language support

  jlaso_sitemap:
      path: "%kernel.root_dir%/../web/sitemap.xml"
      items:
        Post:
          entity: AppCoreBundle:Post
              loc: {route: _post_@language, params: {post_id: id, title: slug}}
              lastmod: updatedAt
              priority: 0.5

 ; OR

  jlaso_sitemap:
      path: "%kernel.root_dir%/../web/sitemap.xml"
      items:
        Post:
          entity: AppCoreBundle:Post
              loc: {route: _post, params: {post_id: id, title: slug_language, language: _language}}
              lastmod: updatedAt
              priority: 0.5

```

My route is: \_post: pattern: /{post\_id}/{title}/

My database table post(id, title, slug, text, createdAt, updatedAt)

if you have not slug field and you want to generate slug from title field use this configuration

loc: {route: \_post, params: {post\_id: id, {field: title, class: App\\CodeBundle\\Inflector, method: slug}}}

In your controller
==================

[](#in-your-controller)

```
 $sitemapGenerator = $this->get('sitemap.generator');
 $sitemapGenerator->generate($language);

```

ROUTING.YML
===========

[](#routingyml)

```
; alone

JlasoSitemapBundle:
    pattern: /sitemap.xml
    defaults: { _controller: JlasoSitemapBundle:Sitemap:generate, _method:GET }

; with language support

JlasoSitemapBundle:
    pattern: /sitemap_{language}.xml
    defaults: { _controller: JlasoSitemapBundle:Sitemap:generate, _method:GET, language:'' }

; with entity selection for multiple sitemap generation

JlasoSitemapBundlePost:
    pattern: /sitemap-post-_{language}.xml
    defaults: { _controller: JlasoSitemapBundle:Sitemap:generate, _method:GET, language:'en', item:'Post' }
    # the item parameter must match with one of os_sitemap.items definition in config.yml

```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f19216fd9d91bd7cfff14362e2ddb5728bd2d8f50d2e0174626fc61510ed33b?d=identicon)[jlaso](/maintainers/jlaso)

---

Top Contributors

[![jlaso](https://avatars.githubusercontent.com/u/1332197?v=4)](https://github.com/jlaso "jlaso (4 commits)")

### Embed Badge

![Health badge](/badges/jlaso-sitemap-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/jlaso-sitemap-bundle/health.svg)](https://phpackages.com/packages/jlaso-sitemap-bundle)
```

###  Alternatives

[doublesecretagency/craft-cpbodyclasses

Adds special classes to the Control Panel's &lt;body&gt; tag.

2437.8k](/packages/doublesecretagency-craft-cpbodyclasses)

PHPackages © 2026

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