If you want to move the property values from the welsh properties and put them into the variants?
then it's probably a code thing as its quite specific.
you will need to load up each content item get the values from the welsh fields and then set them in the variant one doing
item.SetValue(alias, value, culture)
so that might be something like (assuming item is an IContent item)
var value = item.GetValue("welshTitle");
item.SetValue('pageTitle', value, 'cy');
bit of a pain :( - depending on content this may be to much work.
hacky wise you might be able to do this using uSync.ContentEdition and manipulating the files - if will dump all the content into .config files in the uSync folder, and you could if you're into that sort of thing manipulate the files to move the welsh values into the variant values, and then import them. Again depends on your setup.
I've had experience writing code to import data when we moved from our old CMS to Umbraco 7.5.14, and even though it is a pain, I'd much prefer to do it in code.
Populate Language Variant with existing doctype fields
I've just migrated the v7.15.1 database to v8.1.1, and would like help with populating the language variant with existing doctype values.
Our old site had English fields and Welsh fields all in one doctype.
I would like to remove the Welsh fields after populating a Welsh language variant.
Any help in how to go about this would be very much appreciated.
Can it be done in code?
Thanks Muiris
Hi Muiris,
If you want to move the property values from the welsh properties and put them into the variants?
then it's probably a code thing as its quite specific.
you will need to load up each content item get the values from the welsh fields and then set them in the variant one doing
so that might be something like (assuming
item
is an IContent item)bit of a pain :( - depending on content this may be to much work.
hacky wise you might be able to do this using uSync.ContentEdition and manipulating the files - if will dump all the content into .config files in the uSync folder, and you could if you're into that sort of thing manipulate the files to move the welsh values into the variant values, and then import them. Again depends on your setup.
Many thanks, Kevin, this is just what I need.
I've had experience writing code to import data when we moved from our old CMS to Umbraco 7.5.14, and even though it is a pain, I'd much prefer to do it in code.
Muiris
is working on a reply...