var retValue = 2; //Base+1 // Check if we have a templateID if ( NOT StructIsEmpty(arguments.contentData) AND StructKeyExists(arguments.contentData,"progTemplateID") AND IsNumeric(arguments.contentData.progTemplateID) AND arguments.contentData.progTemplateID GT 0 ) retValue = arguments.contentData.progTemplateID; return retValue; var retValue = 0; // can NOT be the root subsite. If all goes wrong we can not build pages randomly off the root site var contentType = "program"; var useChildSubsite = getUseCatYearSubsiteForProgramsStatus(); //var useChildSubsite = getUseTermSubsiteForProgramsStatus(); var bindIDFieldName = "deptID"; var bindContentType = "department"; var bindValueFieldName = "deptSubsiteID"; var bindReturnValue = application.ptCourseCatalog.catalogPageDAO.getBoundCatalogDataValue(contentData=arguments.contentData,bindIDFieldName=bindIDFieldName,bindContentType=bindContentType,bindValueFieldName=bindValueFieldName); // Check if we have a valid subsiteID if ( IsNumeric(bindReturnValue) AND bindReturnValue GT 0 AND StructKeyExists(request.subsiteCache,bindReturnValue) ) retValue = bindReturnValue; // if useChildSubsite is true if ( retValue GT 0 AND useChildSubsite ) { // Build a child (catalogyear) subsite inside the parent (department) subsite retValue = application.ptCourseCatalog.catalogPageService.buildChildSubsite(contentType=contentType,contentData=arguments.contentData,parentSubsiteID=retValue); } return retValue; var retValue = "new-program-page"; var pageNameMask = getProgramPageNameMask(); var contentField = "progName"; var contentFieldValue = ""; // Set as no value to start var bindIDFieldName = "deptID"; var bindContentType = "department"; var bindValueFieldName = "deptCode"; var bindReturnValue = ""; // Set as no value to start var contentMask = "{program name}"; var bindMask = "{department code}"; // Get the value of the Name Feild for the Content data that was passed in if ( LEN(TRIM(contentField)) AND NOT StructIsEmpty(arguments.contentData) AND StructKeyExists(arguments.contentData,contentField) AND LEN(TRIM(arguments.contentData[contentField])) ) contentFieldValue = arguments.contentData[contentField]; // Check to see if the page name style requires a value from the department element if ( FindNoCase(bindMask,pageNameMask) ) { bindReturnValue = application.ptCourseCatalog.catalogPageDAO.getBoundCatalogDataValue(contentData=arguments.contentData,bindIDFieldName=bindIDFieldName,bindContentType=bindContentType,bindValueFieldName=bindValueFieldName); // if we have a Bind Return Value, replace the Bind Mask string with the Bind Return Value if ( LEN(TRIM(bindReturnValue)) ) pageNameMask = ReplaceNoCase(pageNameMask,bindMask,bindReturnValue); } // if we have a Content Field Value, replace the Content Mask string with the contentFieldValue if ( FindNoCase(contentMask,pageNameMask) AND LEN(TRIM(contentFieldValue)) ) pageNameMask = ReplaceNoCase(pageNameMask,contentMask,contentFieldValue); // Check to make sure we have a PageNameMask that is NOT just dashes (-) if ( LEN(TRIM(ReplaceNoCase(pageNameMask,"-",""))) ) retValue = pageNameMask; return retValue; var retValue = "New Program Page"; var contentField = "progName"; // Check if we have a value in the content Field if ( NOT StructIsEmpty(arguments.contentData) AND StructKeyExists(arguments.contentData,contentField) AND LEN(TRIM(arguments.contentData[contentField])) ) retValue = arguments.contentData[contentField]; return retValue; var retValue = ""; var contentField = "description"; // Check if we have a value in the content Field if ( NOT StructIsEmpty(arguments.contentData) AND StructKeyExists(arguments.contentData,contentField) AND LEN(TRIM(arguments.contentData[contentField])) ) retValue = arguments.contentData[contentField]; if ( LEN(TRIM(retValue)) ) retValue = buildProgramPageTitle(contentData=arguments.contentData); return retValue; var bindIDFieldName = "catalogYear"; var bindContentType = "catalogYear"; var bindValueFieldName = "subsiteName"; var bindReturnValue = application.ptCourseCatalog.catalogPageDAO.getBoundCatalogDataValue(contentData=arguments.contentData,bindIDFieldName=bindIDFieldName,bindContentType=bindContentType,bindValueFieldName=bindValueFieldName); return bindReturnValue;