-
Notifications
You must be signed in to change notification settings - Fork 27
have a default configuration for sitemaps #238
have a default configuration for sitemaps #238
Conversation
foreach ($config['configurations'] as $key => $configuration) { | ||
$container->setParameter($this->getAlias().'.sitemap.'.$key.'_configuration', $configuration); | ||
// $container->setParameter($this->getAlias().'.sitemap.'.$key.'_configuration', $configuration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: remove if really unused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought that is the chance to create a default sitemap equal to the manager definition in the doctrine bundles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
eef9139
to
a2c109a
Compare
$configurations['templates'][$format] = $name; | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: create configuration 'default' if it was not customized, so that the controller can handle the default sitemap without special case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome.
a2c109a
to
7385dd9
Compare
@@ -106,12 +106,24 @@ public function getConfigTreeBuilder() | |||
->addDefaultsIfNotSet() | |||
->canBeEnabled() | |||
->children() | |||
->arrayNode('defaults') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the real purpose of this PR: we can now configure defaults for all sitemap configurations in one place, and override them specifically.
@ElectricMaxxx ok, updated and fixed. imho this would be ready. can you review and merge if you agree please? i can then squash the main PR and merge that. and then we have to start with doc or nobody will ever figure out how to use this :-) |
Travis seems to be unhappy. Will Review and merge tonight (of this afternoon).
|
the build issue was something about composer update failing. restarted those builds, lets see. |
have a default configuration for sitemaps
thank @dbu |
alternate locales is noted in : symfony-cmf/symfony-cmf-docs#582, error pages in symfony-cmf/symfony-cmf-docs#606. i now created symfony-cmf/symfony-cmf-docs#681 for sitemap |
we now have a configuration section for defaults. and sitemaps are actually checked for valid configuration.
if no configurations are specified, a
default
configuration with only the defaults will automatically exist. as soon as configurations are given, default has to be specified explicitly if it should exist. a configuration can be empty if its only used for specific voters or guessers but runs with the default templates + frequency.