-
Notifications
You must be signed in to change notification settings - Fork 27
Sitemap generation #196
Sitemap generation #196
Conversation
*/ | ||
class SitemapController extends Controller | ||
{ | ||
const TEMPLATE_HTML = 'CmfSeoBundle:Sitemap:index.html.twig'; |
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 file seems to be missing
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.
do we even need a html representation? what is the use case?
this is not suitable for the cms user site map which is structured and nicely curated. if anything, we would want some "show in sitemap" flag on routes - which can be managed with the route attributes if needed.
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.
I think We should add that, cause We have the data at this point. Would have to add some kind of sorting while creating the list (nested set idea) in the generator. the template i forgot to implement would be a generic one to override it.
* | ||
* Depending on the type the controller is able to respond | ||
* json, xml or html string. | ||
* @author Maximilian Berghoff <[email protected]> |
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.
requires empty line
0556dd6
to
3d56fbf
Compare
{ | ||
const TEMPLATE_HTML = 'CmfSeoBundle:Sitemap:index.html.twig'; | ||
|
||
const TEMPLATE_XML = 'CmfSeoBundle:Sitemap:index.xml.twig'; |
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.
should we move that to configuration? or at least to a parameter in the service definition xml file?
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.
I don't think so, there are many easy ways to override a template of a third party bundle.
I'm sorry to join this party so late, but I'm finished now. :) |
if (empty($this->providers[$priority])) { | ||
$this->providers[$priority] = array(); | ||
} | ||
$this->providers[$priority][] = $provider; |
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.
add: $this->sortedProviders = array();
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.
i should empty the array every time i add a new one, really?
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->sortedProviders would be the cache for the providers, needs to be reset each time a provider is added when doing caching
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.
but see below
6 to 200 lets go ... |
@@ -1,6 +1,8 @@ | |||
Changelog | |||
========= | |||
|
|||
* **2015-14-02**: implement sitemap generation | |||
* **2015-14-02**: [BC BREAK] Relax method visibility on "\Symfony\Cmf\Bundle\SeoBundle\SeoPresentation" |
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.
I would say: "[BC BREAK] Changed method visibility from private to public of SeoPresentation#getSeoMetadata()"
As you changed the Configuration class, you should update the XML schema definition too. (201, let's stop here) |
b405b12
to
87fcbad
Compare
imho this is ready to merge. @wouterj is the xml schema correct now? i would not do the caching of sorted providers - there will be 1, maybe two in normal cases, and they should only be used once. the overhead of fetching all urls of the system twice must be way more than re-sorting the providers so i think we should not bother. @ElectricMaxxx can you squash one more time please? |
I will do the xml schema stuff in #213 with the missed schemas for alternate locale and error sites. i will squash it now. |
8b88132
to
b2e8b97
Compare
✅ |
Hello, Have you got an idea of when it will be available in a release (or prerelease) ? Thank you |
in general it will be released with CMF 1.3 which is likely going to happen in march/april. then again, we could already release a new SeoBundle minor release before that .. at least from a quick skim, none of the changes in master require new versions of any dependency: |
we should first get the xsd schema update merged. but apart that why not, lets create a release then. |
@Peekmo meanwhile, would you mind trying out in your project if the sitemap works as expected for you? |
This means that the tab PR is not going to make it into SeoBundle 1.2 and that we should postpone tab support to CMF 1.4? |
no. not necessarily. we can do another minor release of the SeoBundle once we are ready to release CMF 1.3 |
agreed, we can do a seo bundle 1.3 when we do the next general cmf release round and bump to sonata 2.4. minor versions don't cost us much. |
Started working on that feature. That would be the task: