// Create the Image Textblock Component csWidget = CreateObject('component','csw-imagetextblock'); // load necessary resources csWidget.loadResources(); // exit if all we're doing is detecting required resources if( Request.RenderState.RenderMode EQ "getResources" ) exit; if( NOT structKeyExists(attributes,'elementinfo') ) exit; // Load the Properties from the metadata form props = csWidget.loadProperties(Attributes.ElementInfo,Variables.Caller); // Make sure we have Props data if( NOT csWidget.hasProperties(props) ) exit; // Get the element Data and Render the items if( StructKeyExists(Attributes.ElementInfo.ElementData, 'PropertyValues') ) csWidget.getAndRenderItems( Attributes.ElementInfo.ElementData, props ); var fieldMappingArray = ArrayNew(1); var fieldDetailsStruct = StructNew(); fieldDetailsStruct = StructNew(); fieldDetailsStruct.FieldName = 'Title'; fieldDetailsStruct.Description = 'The Title for the Image Text Block.'; fieldDetailsStruct.Required = 1; arrayAppend(fieldMappingArray, fieldDetailsStruct); fieldDetailsStruct = StructNew(); fieldDetailsStruct.FieldName = 'Image'; fieldDetailsStruct.Description = 'The image to display for the Image Text Block.'; fieldDetailsStruct.Required = 1; arrayAppend(fieldMappingArray, fieldDetailsStruct); fieldDetailsStruct = StructNew(); fieldDetailsStruct.FieldName = 'ImageFocalPoint'; fieldDetailsStruct.Description = "The image's focal point position for the Image Text Block."; fieldDetailsStruct.Required = 0; arrayAppend(fieldMappingArray, fieldDetailsStruct); fieldDetailsStruct = StructNew(); fieldDetailsStruct.FieldName = 'Subtitle'; fieldDetailsStruct.Description = 'The Subtitle for the Image Text Block.'; fieldDetailsStruct.Required = 0; arrayAppend(fieldMappingArray, fieldDetailsStruct); fieldDetailsStruct = StructNew(); fieldDetailsStruct.FieldName = 'Description'; fieldDetailsStruct.Description = 'The Description for the Image Text Block.'; fieldDetailsStruct.Required = 0; arrayAppend(fieldMappingArray, fieldDetailsStruct); fieldDetailsStruct = StructNew(); fieldDetailsStruct.FieldName = 'LinkURL'; fieldDetailsStruct.Description = 'The server relative URL for the link associated with the link or button.'; fieldDetailsStruct.Required = 0; arrayAppend(fieldMappingArray, fieldDetailsStruct); fieldDetailsStruct = StructNew(); fieldDetailsStruct.FieldName = 'LinkText'; fieldDetailsStruct.Description = 'The text that will render for the Link or Button in the Image Text Block.'; fieldDetailsStruct.Required = 0; arrayAppend(fieldMappingArray, fieldDetailsStruct); return fieldMappingArray;