variables.ElementName = getCalPageMapCEName(); variables.ElementIDfield = "mapID"; //variables.CCAPIName = getCCAPIName(variables.elementName); //variables.elementViewName = getCEViewName(variables.elementName); if ( LEN(arguments.uniqueID) ) return application.ptCalendar.ceData.getCEData(variables.ElementName, variables.ElementIDfield, TRIM(arguments.uniqueID)); else return application.ptCalendar.ceData.getCEData(variables.ElementName); var rtnStruct = StructNew(); var pageMap = StructNew(); var pageMapAry = getCalPageMap(); var itm = 1; var ssPos = 1; var ssidList = ""; var subsite = ""; var key = ""; var fieldExceptionList = "mapID,subsite,orgID"; // build the page map structure indexed by subsite for ( itm=1; itm LTE ArrayLen(pageMapAry); itm=itm+1 ) { pageMap[pageMapAry[itm].values.subsite] = pageMapAry[itm].values; } // return the map appropriate for the calling subsite if ( ListLen(StructKeyList(pageMap)) ) { ssidList = request.subsiteCache[arguments.subsiteID].subsiteInheritance; for ( ssPos=1; ssPos LTE ListLen(ssidList); ssPos=ssPos+1 ) { subsite = ListGetAt(ssidList,ssPos); if ( StructKeyExists(pageMap, subsite) ) { rtnStruct = pageMap[subsite]; break; } } } if ( arguments.convertPageIDs ) { for ( key IN rtnStruct ) { if ( !ListFindNoCase(fieldExceptionList,key) ) { rtnStruct[key] = application.ptCalendar.csData.getCSPageURL(rtnStruct[key]); // Append the PageParams on the the genereate page links if ( LEN(TRIM(arguments.pageParams)) ) { if ( Left(arguments.pageParams,1) NEQ "&" ) arguments.pageParams = "&" & arguments.pageParams; rtnStruct[key] = rtnStruct[key] & arguments.pageParams; } } } } return rtnStruct;