Ticket #15829 (https://code.djangoproject.com/ticket/15829) includes a patch that allows exposing the item object the template, which is all that is needed to support any of the specific sitemap extensions.
Regards, Michael Manfre On Jun 22, 8:05 pm, Jeremy Dunck <[email protected]> wrote: > Referring to Django's support for > sitemaps:https://code.djangoproject.com/browser/django/trunk/django/contrib/si...https://docs.djangoproject.com/en/1.3/ref/contrib/sitemaps/ > > In addition to the standard sitemaps, Google also specifies some > extensions:http://www.google.com/support/webmasters/bin/topic.py?hl=en&topic=20986 > (Does anyone know of other extensions to sitemaps?) > > The purpose of these extensions are to give more info on > semi-structured content and a better search result. > > In an internal codebase, we have video and news extensions now. This > involves a fair bit of code duplication -- Sitemap.items and > Sitemap.get_urls, as well as a template that is roughly a copy of the > stock sitemaps.xml with some additional values. > > I was thinking a few small changes could make this customizable with > less code duplication -- > 1) .get_urls could call a per-item hook, .get_extra(item, url_info) > to annotate the stock url_info. > 2) the stock sitemap.xml could have blocks for adding namespaces as > well as a block to dump the extra attributes into. > 3) the Sitemap object could grow a template_name attribute so that > where section is not None, a single urlconf declaration could be used > with different templates. > > Outside core, a small project could then exist which implements all > the existing format extensions. > > Thoughts? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
