I'm setting up a 1-1 multiligual site (in 4.7x) and want to set it so that when the primary sites node is saved it copies the node to the other site. I can do the copy from an event but is there an API call which allows me to relate the new node to the orginal like in the UI copy.
Also I would like to add something into the UI of the page that will redirect the user to edit the new node. Is the best acheived through a datatype? And is redirecting to another node in the admin interface even possible?
Many thanks Jan! The relation api looks to be just what I need to keep the nodes between language sites linked.
I don't think really explained myself properly about the redirect part. Basically in the cms I want to display the alternate languages linking to the're child nodes on the primary nodes editor pane (e.g. German, Czech linking to the related node in the relivent language).
So after saving a new page the content editor can click on the alternative language and be taken to the linked node for that language and edit it. I don't want the content editor to have to find the content I copied to the other site themselves in the content tree.
I'm making alot of assumtions on what is possible, but I think it's possible to add the interface through a custom datatype. Althought there may be a better way to do even this as I don't really need to store anything here it's allready in the relations.
Ah ok in that way. Yes I believe you should be able to create a datatype where you can create a user control that could list the different languages, in which the current page is "translated" to.
I also think you should be able to use the relations API to do that - but since I'm not a backend dev I'm not sure what steps it will require.
I guess you will have moved on with the relations API and everything by now, but just in case you ever need an alternative solution, you might want to have a look at this:
1-1 Multiligual site with redirect in admin
Hi
I'm setting up a 1-1 multiligual site (in 4.7x) and want to set it so that when the primary sites node is saved it copies the node to the other site. I can do the copy from an event but is there an API call which allows me to relate the new node to the orginal like in the UI copy.
Also I would like to add something into the UI of the page that will redirect the user to edit the new node. Is the best acheived through a datatype? And is redirecting to another node in the admin interface even possible?
Thanks
Aaron
Hi Aaron and welcome to the community :)
I think you could perhaps benefit from reading this blogpost by hendy archer about using the relations API in Umbraco? http://blog.hendyracher.co.uk/umbraco-relation-api/
Regarding the redirect you can perhaps benefit from using the umbracoInternalRedirectId alias on your document type? Read more about it here: http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbracointernalredirectid and here: http://cultiv.nl/blog/2009/6/28/umbraco-tip-of-the-week-redirects/
Hope this helps.
/Jan
Many thanks Jan! The relation api looks to be just what I need to keep the nodes between language sites linked.
I don't think really explained myself properly about the redirect part. Basically in the cms I want to display the alternate languages linking to the're child nodes on the primary nodes editor pane (e.g. German, Czech linking to the related node in the relivent language).
So after saving a new page the content editor can click on the alternative language and be taken to the linked node for that language and edit it. I don't want the content editor to have to find the content I copied to the other site themselves in the content tree.
I'm making alot of assumtions on what is possible, but I think it's possible to add the interface through a custom datatype. Althought there may be a better way to do even this as I don't really need to store anything here it's allready in the relations.
Hi Aaron
Ah ok in that way. Yes I believe you should be able to create a datatype where you can create a user control that could list the different languages, in which the current page is "translated" to.
I also think you should be able to use the relations API to do that - but since I'm not a backend dev I'm not sure what steps it will require.
/Jan
The relation bit of it was very easy thanks to the relation API. Thanks for the info Jan.
For anyone interested I found a way to open the other nodes using JavaScript openContent('nodeid')
Hi Aaron,
I guess you will have moved on with the relations API and everything by now, but just in case you ever need an alternative solution, you might want to have a look at this:
http://our.umbraco.org/projects/backoffice-extensions/polyglot
By the way, I am not advertising. The package is for free; always was and always will be :)
I've also put together a little video of how it works:
http://dimitros.net/polyglot?lang=en
Cheers,
Dimitri
is working on a reply...