Skip to content

2.3.8

Compare
Choose a tag to compare
@martyf martyf released this 22 Jun 07:40
· 10 commits to main since this release

Adds support for field mappings.

Refer to the revised default config file for the new mappings key that allows you to map Statamic's opinionated field handles with fields of your own:

    /*
    |--------------------------------------------------------------------------
    | Field mappings
    |--------------------------------------------------------------------------
    |
    | Allows you to map your blueprint fields with what Sitemapamic is expecting for controlling
    | the change frequency, inclusion and priority.
    |
    */
    'mappings' => [
        'include' => 'meta_include_in_xml_sitemap',
        'change_frequency' => 'meta_change_frequency',
        'priority' => 'meta_priority',
    ]

If you have your own fields, such as "sitemap_include", "sitemap_change_frequency" and "sitemap_priority", your config file needs:

    'mappings' => [
        'include' => 'sitemap_include',
        'change_frequency' => 'sitemap_change_frequency',
        'priority' => 'sitemap_priority',
    ]

If you don't want to change use the mappings, that's cool: there's nothing to do. Your existing setups will function as they always have.