Quote from: citrus at Feb 21, 2011, 06:58 AM
Is there any way to control both the priority and frequency, rather than it defaulting to when the resource was last updated?
I had the same problem. Here’s a (not so elegant) fix:
- make two TVs: "changefreq" and "priority" and use them on all templates that you might want to set custom changefreq and priority
- change the sitemap_xml_item chunk: replace the <changefreq> and <priority> lines with the ones i’ve provided below
- if you haven’t, install getResourceField extra
if you need any more details, let me know
<changefreq>[[!getResourceField:ifempty=`[[+changefreq]]` ? &id=`[[+id]]` &field=`changefreq` &processTV=`1`]]</changefreq>
<priority>[[!getResourceField:ifempty=`[[+priority]]` ? &id=`[[+id]]` &field=`priority` &processTV=`1`]]</priority>
On a different subject, i’m working on a fix to allow to set "lastmod" from a list of children. What do i mean?
For example, i have this structure:
Events
|------Event 1
|------Event 2
|------Event 3
|------...
and i want the <lastmod> of the "Events" resource to match the <lastmod> of the most recently edited child.
I created the code to get the latest "editedon", I now have to integrate it to the sitemapfriend snippet...
Hopefully you’ll have news soon in case you’re interested