8

Product support

Visit this product's website for support.

  • Added on Nov 18, 2014
  • Current version: 1.2.8
  • Platform Compatibility
    v3.x not tested
    v2.x use latest
    v1.x use latest
  • Extensions: 1
  • Created by
  • Public repository

Categories

This plugin will a generate sitemap.xml file in OctoberCMS based on desired CMS pages and others.

Viewing the sitemap

Once this plugin is installed and the sitemap has been configured. The sitemap can be viewed by accessing the file relative to the website base path. For example, if the website is hosted at http://octobercms.com/ it can be viewed by opening this URL:

http://octobercms.com/sitemap.xml

Managing a sitemap definition

The sitemap is managed by selecting Sitemap from the Settings area of the back-end. There is a single sitemap definition for each theme and it will be created automatically.

A sitemap definition can contain multiple items and each item has a number of properties. There are common properties for all item types, and some properties depend on the item type. The common item properties are Priority and Change frequency. The Priority defines the priority of this item relative to other items in the sitemap. The Change frequency defines how frequently the page is likely to change.

Standard item types

The available item types depend on the installed plugins, but there are three basic item types that are supported out of the box.

URL

Items of this type are links to a specific fixed URL. That could be an URL of an or internal page. Items of this type don't have any other properties - just the title and URL.

Static page

Items of this type refer to static pages. The static page should be selected in the Reference drop-down list described below.

All static pages

Items of this type expand to create links to all static pages defined in the theme.

Custom item types

Other plugins can supply new item types. For example, the Blog plugin by RainLab supplies two more types:

Blog category

An item of this type represents a link to a specific blog category. The category should be selected in the Reference drop-down. This type also requires selecting a CMS page that outputs a blog category.

All blog categories

An item of this time expands into multiple items representing all blog existing categories. This type also requires selecting a CMS page.

Definition item properties

Depending on the selected item time you might need to provide other properties of the item. The available properties are described below.

Reference

A drop-down list of objects the item should refer to. The list content depends on the item type. For the Static page item type the list displays all static pages defined in the system. For the Blog category item type the list displays a list of blog categories.

Allow nested items

This checkbox is available only for item types that suppose nested objects. For example, static pages are hierarchical, and this property is available for the Static page item type. On the other hand, blog categories are not hierarchical, and the checkbox is hidden.

CMS Page

This drop-down is available for item types that require a special CMS page to refer to. For example, the Blog category item type requires a CMS page that hosts the blogPosts component. The CMS Page drop-down for this item type will only display pages that include this component.

The following plugin extends or depends on the plugin
The following themes use this plugin

The Sitemap plugin works out of the box and does not require any direct development to operate.

Registering new sitemap definition item types

The Sitemap plugin shares the same events for registering item types as the Pages plugin. See the documentation provided by this plugin for more information.

A small addition is required when resolving items, via the following event:

  • pages.menuitem.resolveItem event handler "resolves" a menu item information and returns the actual item URL, title, an indicator whether the item is currently active, and subitems, if any.
Resolving items

When resolving an item, each item should return an extra key in the array called mtime. This should be a Date object (see Carbon\Carbon) or some other value compatible with PHP's date() function and represent the last time the link was modified.

Expected result format:

Array (
    [url] => http://example.com/blog/category/another-category
    [mtime] => Carbon::now(),
    [items] => Array (
        [0] => Array  (
            [url] => http://example.com/blog/category/another-category
            [mtime] => Carbon::now(),
        )

        [1] => Array (
                [url] => http://example.com/blog/category/news
                [mtime] => Carbon::now(),
        )
    )
)
  • Found the plugin not useful on 1 Jan, 2022

    Doesn't work with the translate plugin themselves created.

  • Found the plugin useful on 21 Aug, 2019

    Super easy to use, thanks

  • Found the plugin useful on 11 Jul, 2019

    This is a good plugin for simple websites, if you want to auto generate all the URLs based on your models you can checkout my plugin here: https://octobercms.com/plugin/arcane-seo

    Contributions and reviews are welcomed.

  • Found the plugin useful on 21 Mar, 2019

    When I use plugin Translate so sitemap generate url without prefix for default language.

    For example: The url should be: https://www.example.com/en/page-slug but in sitemap is https://www.example.com/page-slug

    THX

  • Found the plugin not useful on 14 Jan, 2019

    plugin present errors after instalation.

    Class 'Weglot\Client\Factory\Languages' not found

    not useful.

  • Found the plugin useful on 1 Oct, 2018

    Hello,

    I do not understand the part with pages.menuitem.resolveItem.

    What must I do for this part?

    Thank you

  • Found the plugin not useful on 7 Nov, 2017

    Dynamic routes generated as "default" instead of ":category" in Sitemaps module

    I have created two routes to list posts from RainLab.Blog in a site, one that lists all posts (/posts/:page) and another one that lists posts filtered by a category (/:category/:page), and the individual post is set to be (/:category/:slug).

    Although it is working for the frontend, the Sitemaps module is failing to generate the correct individual posts, generating them like so: (/default/:slug).

    I am not sure what should be done to achieve the expected behavior. Also, even though this could be a question related to the plugin, I would like to understand where to look for in the source code in order to understand why this is happening.

    Thank you in advance

  • Found the plugin useful on 7 Oct, 2017

    Works well, just wish there was an option to automatically add new pages. Doing this manually is a pain.

  • Found the plugin useful on 10 Sep, 2017

    Hello, thank you for this plugins! How to add a CSS style sheet "xml-sitemap.xsl" for a nice display? It should be added: <?xml-stylesheet type="text/xsl" href="xml-sitemap.xsl"?> after: <?xml version="1.0" encoding="UTF-8"?>

  • Found the plugin not useful on 21 Jul, 2017

    Manual adding pages to the sitemap.xml is not cool at all.

  • Found the plugin not useful on 12 Apr, 2017

    Херня полная

  • Found the plugin not useful on 10 Apr, 2017

    It would be nice to have some kind of the ability to automatically generate sitemap. Probably, using set of the mentioned techniques or just one of them:

    • Allow other plugins to update the sitemap using some sort of API
    • Allow RainLab plugins to automatically update it
    • Scan website page by page and add links to the sitemap (like it is done in DataLifeEngine or Wordpress, or even in other CMS)

  • Found the plugin not useful on 7 Apr, 2017

    I wish there was an upload csv or xml feature, takes ages to do it manually.

  • Found the plugin not useful on 19 Sep, 2016

    No good this plugin, you can only create one sitemap.

  • Found the plugin useful on 13 Nov, 2015

    So useful plugin!

  • Found the plugin useful on 23 Aug, 2015

    Great plugin! Thanks for the contribution!

  • Found the plugin useful on 28 Nov, 2014

    This is a much needed plugin for October. Very flexible, simple, and functional. I love that it just "works" with static menus integrated plugins like ProBlog and ProEvents as well!

  • Found the plugin useful on 20 Nov, 2014

    Thanks!

1.2.8

Compatibility fixes for October v3.7

Oct 18, 2024

1.2.7

Minor bug fixes using October CMS v3.4

Jul 29, 2023

1.2.6

Bump version

Apr 26, 2023

1.2.4

Fixes support with pagefinder events

Apr 26, 2023

1.2.3

Fixes support with October CMS v1

Oct 11, 2022

1.2.2

Fixes error when sitemap not found

Oct 10, 2022

1.2.1

Adds route caching support

Oct 10, 2022

1.2.0

Improve support with October v3.0

May 13, 2022

1.1.2

Minor logic fixes

Feb 24, 2022

1.1.1

Fixes saving in October CMS v2

Oct 14, 2021

1.1.0

Add support for alternate locales in sitemap

Oct 10, 2021

1.0.9

Replaced the 500 error with 404 when no definition is found. Added Czech translation. Improved Turkish, Hungarian and Portuguese (Brazil) translations.

May 18, 2019

1.0.8

Minor styling updates.

Nov 22, 2016

1.0.7

Added access premissions.

Nov 22, 2016

1.0.6

Minor fix to internal API.

Sep 08, 2015

1.0.5

Minor back-end styling fix.

Jul 10, 2015

1.0.4

Fixes issue where correct headers not being sent.

Mar 13, 2015

1.0.3

Minor improvements to the code.

Feb 25, 2015

1.0.2

Create definitions table

Nov 18, 2014

1.0.1

First version of Sitemap

Nov 18, 2014