6

I have 3 fields in a schema. To one of the fields I added a custom URL. The custom URL points to a .NET page which I have created. While creating the component, when I click on the custom URL field I need to pass the field value of 2 other fields to that custom URL page.

I have 3 fields like below.

  1. Video Name
  2. Short Desc.
  3. Video ID

Video ID has custom URl(MY .NET Page). I need to pass video name and Short Desc pass to that custom URL page.

I am using Tridion 2013 SP1.

How can I achieve this?

4
  • What version of SDL Tridion are you using? Mar 20, 2014 at 8:50
  • Tridion 2013 SP1 Mar 20, 2014 at 8:53
  • Edited tag to be 2013 - we don't use minor versions in Tridion version tags.
    – Nuno Linhares
    Mar 20, 2014 at 10:15
  • i am using window.dialogArguments.getFields(); mathod but it gives only current filed i.e Video ID and not able to get value of Video name and short Desc. Mar 20, 2014 at 11:29

2 Answers 2

5

There's a few good examples in the documentation on how to both read and modify values from a custom URL. Please read the chapter titled "Manipulating field values from a Custom URL Resource."

It seems to boil down to using getFields and container Javascript objects.

5
  • Good edit from @jarnohenneman noting login required. I added a link. See Meta for which links to use. Mar 24, 2014 at 9:43
  • Just out of curiosity, is it possible to implement with Tridion 2011 SP1 ?
    – user584
    Mar 31, 2014 at 6:44
  • Yes, Custom URLs are available in Tridion 2011 and even earlier, though the API and how to use the script have changed (since about 2011 SP1, where the docs say they were "deprecated"--but that just refers to how to call and use the script pop-up script). May 21, 2014 at 4:59
  • I removed "login required." Mar 11, 2015 at 21:38
  • The community also has examples on TridionWorld and in this post. Since the question I also made Color- and Coordinate-picker Custom URL examples. Mar 11, 2015 at 21:46
0

You should have you .NET application at tridionDir/web/
Add the following java script to layout of your application

<script type="text/javascript" language="javascript" src="/WebUI/Core/Controls/Popup/PopupInit.js"></script>

In your application use the following java script code to get the other two fields-

var field = window.dialogArguments.container.getField('xml_fieldname').getValues();
var myvalue=field[0];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.