Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Aaron Devaney 14 posts 44 karma points
    Feb 12, 2012 @ 14:10
    Aaron Devaney
    0

    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

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 12, 2012 @ 21:36
    Jan Skovgaard
    0

    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

  • Aaron Devaney 14 posts 44 karma points
    Feb 12, 2012 @ 22:48
    Aaron Devaney
    0

    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.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 13, 2012 @ 08:02
    Jan Skovgaard
    0

    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

  • Aaron Devaney 14 posts 44 karma points
    Feb 13, 2012 @ 10:53
    Aaron Devaney
    0

    The relation bit of it was very easy thanks to the relation API. Thanks for the info Jan.

  • Aaron Devaney 14 posts 44 karma points
    Feb 13, 2012 @ 22:50
    Aaron Devaney
    0

    For anyone interested I found a way to open the other nodes using JavaScript openContent('nodeid')

  • dimi309 245 posts 579 karma points
    Feb 13, 2012 @ 23:22
    dimi309
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft