The usual use of this technique, is to insert tags into the page - for example %SCRIPT% - that the Template After Code can look for, and replace with appropriate values, usually HTML or scripts.
This technique is particularly useful when outputting data or scripts onto the page that varies from user to user, or varies depending on current system or class settings. It can also be used to output HTML containing integrated data, when the rules for integration are more complex than can be easily handled using standard templates.
Sample code is:
SUBROUTINE CIS_COURSE_M_htm_After(Command,User,DatabaseeClassList,KeyList,InstanceList,ErrorMessageList,SequenceList,NoUpdateFlagList,SearchFlag,Response,Error,MetaErrorFlag)
$INCLUDE FB_BP Freedombase_Definition
CreateCourseDate = ''
IF FIELD(Command,' ',1) = 'CreateCourse' THEN
CreateCourseDate = OCONV(FIELD(Command,' ',2),'D')
END
Response = CHANGE(Response,'%CREATECOURSEDATE%',CreateCourseDate)
RETURN
END
| previous |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |

