Commit a7fec499 authored by Dominique Feyer's avatar Dominique Feyer
Browse files

[TASK] Add save path configuration in presets

parent a185471d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ class SitemapCommandController extends CommandController {
        $definition = new SitemapDefinition($siteNodeName, $baseUrl, $preset);
        $sitemap = $this->sitemapBuilder->build($definition);

        $pathAndFilename = FLOW_PATH_DATA . '/Persistent/Sitemaps/Sitemap.xml';
        $pathAndFilename = $definition->getPath();
        Files::createDirectoryRecursively(dirname($pathAndFilename));
        file_put_contents($pathAndFilename, (string)$sitemap);
    }
+4 −0
Original line number Diff line number Diff line
@@ -75,4 +75,8 @@ class SitemapDefinition {
        return $this->presets[$this->presetName];
    }

    public function getPath() {
        return $this->getPreset()['path'];
    }

}
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -8,3 +8,4 @@ Ttree:
          skip:
            'TYPO3.Neos:Shortcut': TRUE
          type: 'single'
          path: '%FLOW_PATH_DATA%/Persistent/Sitemaps/Sitemap.xml'
+3 −1
Original line number Diff line number Diff line
@@ -22,9 +22,11 @@ Edit your distribution [Settings.yaml](Configuration/Settings.yaml) for configur
              skip:
                'TYPO3.Neos:Shortcut': TRUE
              type: 'single'
              path: '%FLOW_PATH_DATA%/Persistent/Sitemaps/Sitemap.xml'

Basically you can configure the NodeType who need to be in the sitemap, and an optional list of NodeType that need to 
be skipped.
be skipped. Currently the package support only "single" type. In the future "multiple" will be support to generate multiple
sitemap with a single index.

Currently to Job Queue is not supported but you can use the CLI command::