I am using umbraco 4.11.8 this is an inherited multilingual site. When the client created the language nodes they copied the english master and then removed added pages, also they did not relate to original during the copy.
Now for seo purposes we want to add hreflang alternate link tags so for each page show the alternate language version if it exits. So what we are looking to do is using relation types create new relate on copy relations for all the existing content is this possible todo? I have had a look in the developer section and under Relation types - Relate document on copy under Relations tab but cannot see how to add new relations, currently the list is empty as i do not have any relate on copy which is correct as the editors have never copied with relate on copy. If this is not possible then i guess would have to add mntp picker and relation for it so then for each page tag up its different language version then i have similar relate on copy related links?
I can't remember if the API lets you do it, but the relation table is very simple, so if you know which nodes you want to relate, you could just do a direct sql insert?
This is for umbraco 4.11.8 yuck inherited site nothing we can do there. One more question though, lets say in multilingual site you create a new language site from english via a copy and you check relate items to original, does this mean after the copy you will have only relate from root to root or will all the child pages relate to their english equivalents?
Create new relate on copy
Hello,
I am using umbraco 4.11.8 this is an inherited multilingual site. When the client created the language nodes they copied the english master and then removed added pages, also they did not relate to original during the copy.
Now for seo purposes we want to add hreflang alternate link tags so for each page show the alternate language version if it exits. So what we are looking to do is using relation types create new relate on copy relations for all the existing content is this possible todo? I have had a look in the developer section and under Relation types - Relate document on copy under Relations tab but cannot see how to add new relations, currently the list is empty as i do not have any relate on copy which is correct as the editors have never copied with relate on copy. If this is not possible then i guess would have to add mntp picker and relation for it so then for each page tag up its different language version then i have similar relate on copy related links?
Regards
Ismail
Have you tried http://viziozrelationships.codeplex.com? I think you can add relations.
I can't remember if the API lets you do it, but the relation table is very simple, so if you know which nodes you want to relate, you could just do a direct sql insert?
Actually, I think we are creating relations like this:
RelationType copyType = RelationType.GetByAlias("relateDocumentOnCopy");
Relation.MakeNew(parentId, childId, copyType, comment);
Shanem, cool will take a look at that, Morten yup can do it with api but i need editors to do it.
Regards
Ismail
@Morten Just as FYI those are obsoleted methods now, use the RelationService instead. http://our.umbraco.org/documentation/Reference/Management-v6/Services/RelationService
@Ismail Ahh, I didn't get the part that it was a manual editor task. I thought you wanted to batch update all the existing pages.
@Sebastian I know, but the opening question mentioned the solution is version 4.11.8 (And the site I took the code from is v. 4.9)
Sebastiaan,
This is for umbraco 4.11.8 yuck inherited site nothing we can do there. One more question though, lets say in multilingual site you create a new language site from english via a copy and you check relate items to original, does this mean after the copy you will have only relate from root to root or will all the child pages relate to their english equivalents?
Regards
Ismial
@Ismail If I recall correctly, copying a structure with "relate to original" will relate the entire tree.
is working on a reply...