Active
Project:
Domain XML sitemap
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Aug 2010 at 16:15 UTC
Updated:
31 Jan 2011 at 03:27 UTC
Here is the thread aiming at automating the diverse tasks of domain sitemap (function domain_xmlsitemap_domainupdate)
1st automation : automatically add the sitemap upon domain creation :
Quite easy :
if ($op == 'create') {
// If domain was created, create sitemap.
$sitemap=array();
$sitemap['context']['domain']=$domain['domain_id'];
xmlsitemap_sitemap_save($sitemap);
}
2nd : automatically delete the sitemap upon domain deletion.
A bit more tricky : function that should be called is xmlsitemap_sitemap_delete with the id of the sitemap as parameter. Before, xmlsitemap_sitemap_load_by_context should be called to load the id of the sitemap.
Last question is : is anything needed on update? I would say no, but we'll have to doublecheck that.
Comments
Comment #1
dave reidIdeally we'd support changing a domain and deleting a domain. I don't think automatically adding sitemaps when new domains are added is a great idea though.
Comment #2
eme commentedFrom what I know, there is nothing to do on update, as the id taken is not the name but the domain_id. So updating a domain does not change anything.
For the automation of the new sitemap, an option should maybe be added. That was the most important for me (as I could not explain my clients that they shoud add the sitemap when adding a new domain). But I agree that maybe some people won't want this option (?).
Comment #3
ayesh commentedIs this feature already implemented ?
I'm using DA for a domain parking system so automating this is very useful for me.
Can you say the lines that I should patch ?
Comment #4
ayesh commented- an accidently posted duplicate of above comment -