Customize sitemap.xml
Permalink 2 users found helpful
I'm looking to change the update frequency and priority of some of my pages from the defaults of "monthly" and "0.5", but I can't find the settings for that. Any suggestions?
For now I'll take the easy route and hardcode what I need. Thanks for your help, tcmfan.
Strangely enough (that's how it always happens), I just figured out how to do it the right way. I came across this thread (http://www.concrete5.org/community/forums/customizing_c5/balloon_tips_on_the_title_of_a_webpage_and_custo) in which andrew describes how to create page attributes.
You just create text box page attributes (as andrew describes) for "sitemap_changefreq" and "sitemap_priority", which then show up as custom fields in the properties window. You add the fields to whichever pages you want to customise, regenerate the sitemap, and there you have it.
You just create text box page attributes (as andrew describes) for "sitemap_changefreq" and "sitemap_priority", which then show up as custom fields in the properties window. You add the fields to whichever pages you want to customise, regenerate the sitemap, and there you have it.
Link got screwed up. Trying again:
http://www.concrete5.org/community/forums/customizing_c5/balloon_ti...
Tinyurl in case that doesn't work:http://preview.tinyurl.com/8wmkcz...
http://www.concrete5.org/community/forums/customizing_c5/balloon_ti...
Tinyurl in case that doesn't work:http://preview.tinyurl.com/8wmkcz...
OK, I get the concept of the code in generate_sitemap.php for setting a priority to a listed page within the sitemap, but I'm not clear on how to assign a 'priority' attribute to a particular page.
I have read the above comments, but some of it goes over my head.
Any help would be much appreciated,
thanks
Peter
I have read the above comments, but some of it goes over my head.
Any help would be much appreciated,
thanks
Peter
sure, just go to your dashboard, to pages and themes, and then to the page attributes (might be under page types, or in its own tab as of 5.4). then create a new "select" type page attribute there. not sure what the different priorities are suppose to be, but you can search the web to find out.
This does not work. I have no idea why, but after creating these two custom attribs which show up perfectly. It still sets it's own values. Crazy.
Hi,
just did it, and it works fine. *thumbsup*
@kstrange: after you added the type, you've to add the field in each page's properties and assign your value to it.
just did it, and it works fine. *thumbsup*
@kstrange: after you added the type, you've to add the field in each page's properties and assign your value to it.
Yes, I'm aware of that. I think you may find disappointment in the coming days - I don't know how many pages or the layout of your site structure, but at the core it still doesn't work correctly.
I hope in your case it does, but I've found the reasons why, and they are definitely busted, I just engineeered a workaround hack and got to where I needed to go.....
Kev
I hope in your case it does, but I've found the reasons why, and they are definitely busted, I just engineeered a workaround hack and got to where I needed to go.....
Kev
I just ran across this old thread today and wanted to post a link that helped me figure out this problem. Directions for any sitemap adjustment without any hardcoding.
http://www.joydeepdeb.com/blog/xml-sitemap-best-practices.html...
http://www.joydeepdeb.com/blog/xml-sitemap-best-practices.html...
You can hardcode some if-conditions there (if you need to change the defaults just for several pages), or maybe perform a complex customization to allow the editing of priority and frequency for each page individually.
Maybe, I'm wrong, but it seems, that there are no attributes "sitemap_changefreq" and "sitemap_priority" by default, even though there is a code checking for it: