Opened 13 years ago

Closed 13 years ago

#15829 closed New feature (fixed)

Provide item to sitemap template

Reported by: Michael Manfre Owned by: Michael Manfre
Component: contrib.sitemaps Version: dev
Severity: Normal Keywords: sitemaps
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

#14041 added the ability to provide a custom template for generating a sitemap. To extend upon that, exposing the item object to the template will allow a way to generate content specific sitemaps (Google News, video, etc) without needing to subclass Sitemap to duplicate most of get_urls.

This could make #10907 (Adding google news sitemap support to django.contrib.sitemaps) unnecessary.

Attachments (3)

sitemaps-item.diff (653 bytes ) - added by Michael Manfre 13 years ago.
Add "item" to url_info added to context.
sitemaps-item.2.diff (1.3 KB ) - added by Michael Manfre 13 years ago.
patch with docs
sitemaps-item.3.diff (2.5 KB ) - added by Michael Manfre 13 years ago.
Patch with added test

Download all attachments as: .zip

Change History (6)

by Michael Manfre, 13 years ago

Attachment: sitemaps-item.diff added

Add "item" to url_info added to context.

by Michael Manfre, 13 years ago

Attachment: sitemaps-item.2.diff added

patch with docs

comment:1 by Jacob, 13 years ago

Easy pickings: unset
Needs tests: set
Triage Stage: UnreviewedAccepted

by Michael Manfre, 13 years ago

Attachment: sitemaps-item.3.diff added

Patch with added test

comment:2 by anonymous, 13 years ago

Needs tests: unset

Ready for checkin?

comment:3 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: newclosed

In [16474]:

Fixed #10907, #14190 and #15829 -- Pass item to sitemaps template to allow further customization like Google News enabled sitemaps. Thanks, manfre and lakinwecker.

Note: See TracTickets for help on using tickets.
Back to Top