Commit a7fec499 authored by Dominique Feyer's avatar Dominique Feyer

[TASK] Add save path configuration in presets

parent a185471d
...@@ -24,7 +24,7 @@ class SitemapCommandController extends CommandController { ...@@ -24,7 +24,7 @@ class SitemapCommandController extends CommandController {
$definition = new SitemapDefinition($siteNodeName, $baseUrl, $preset); $definition = new SitemapDefinition($siteNodeName, $baseUrl, $preset);
$sitemap = $this->sitemapBuilder->build($definition); $sitemap = $this->sitemapBuilder->build($definition);
$pathAndFilename = FLOW_PATH_DATA . '/Persistent/Sitemaps/Sitemap.xml'; $pathAndFilename = $definition->getPath();
Files::createDirectoryRecursively(dirname($pathAndFilename)); Files::createDirectoryRecursively(dirname($pathAndFilename));
file_put_contents($pathAndFilename, (string)$sitemap); file_put_contents($pathAndFilename, (string)$sitemap);
} }
......
...@@ -75,4 +75,8 @@ class SitemapDefinition { ...@@ -75,4 +75,8 @@ class SitemapDefinition {
return $this->presets[$this->presetName]; return $this->presets[$this->presetName];
} }
public function getPath() {
return $this->getPreset()['path'];
}
} }
\ No newline at end of file
...@@ -7,4 +7,5 @@ Ttree: ...@@ -7,4 +7,5 @@ Ttree:
'TYPO3.Neos.NodeTypes:Page': TRUE 'TYPO3.Neos.NodeTypes:Page': TRUE
skip: skip:
'TYPO3.Neos:Shortcut': TRUE 'TYPO3.Neos:Shortcut': TRUE
type: 'single' type: 'single'
\ No newline at end of file path: '%FLOW_PATH_DATA%/Persistent/Sitemaps/Sitemap.xml'
...@@ -22,9 +22,11 @@ Edit your distribution [Settings.yaml](Configuration/Settings.yaml) for configur ...@@ -22,9 +22,11 @@ Edit your distribution [Settings.yaml](Configuration/Settings.yaml) for configur
skip: skip:
'TYPO3.Neos:Shortcut': TRUE 'TYPO3.Neos:Shortcut': TRUE
type: 'single' 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 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:: Currently to Job Queue is not supported but you can use the CLI command::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment