SDL Tridion 2009 SP1自定义URL获取当前字段值

Mar*_*son 5 tridion tridion2009

我将连接到组件字段上的自定义URL,该URL包含以下代码

        function SaveAndClose()
        {
            var newValue = new Array();
            newValue[0] = "/feed.ashx?type="+ $("#Type").val() + "&user="+ $("#User").val();
            window.returnValue = newValue;
            self.close();
        }
       document.write("Current Value:");
       document.write(window.dialogArguments.fieldValue);
Run Code Online (Sandbox Code Playgroud)

SaveAndClose函数完美地工作并将值发送回组件,但window.dialogArguments.fieldValue始终返回undefined.

Pet*_*aer 4

您需要读取customArgumentsdialogArguments 上的属性:

document.write(window.dialogArguments.customArguments.fieldValue);
Run Code Online (Sandbox Code Playgroud)