| Replacement TextOften the web page will need to mix static content with content that is generated on the fly by the web server. For example, you may want to display a list of stock in your warehouse but intermix it with static information. The tcpIQ Site Editor provides a convenient mechanism for handling this situation. It is called Replacement Text. To use the replacement text call the AddReplacementText function prior to calling SiteEditor. AddReplacementText accepts three parameters. The first is Replacement Code which is the text that the authorised user needs to enter into the HTML Rich Text Area. This Replacement Code will be displayed while the pages is being edited. It will be replaced by the Replacement Text when the page is being displayed. The second parameter is simply a description that is displayed on the screen during editing to help the authorised user remember what the Replacement Code does. The last parameter is the Replacement Text that is displayed in replace of the Replacement Code. In the example below, whenever [TIME] is entered into the HTML Rich Text Area, it will be replaced by the current time when the web page is displayed to a non-logged on user. Also [CURRENTPATH] is replaced by the physical path of the web page. The screen shot below shows the results of the AddReplacementText function when the web page is being edited: When the same screen is being viewed it appears as follows: These examples have been made simple for the sake of the demonstration. However, this feature can be readily employed to use information from databases, text files or even other web sites. |
|