Programming Commands
Conditional
ASSIGNED,NOTASSIGNEDConditionally process a phrase based on whether a SessionLiteral or SessionTextArea is not-blank or blank.
Syntax
(~ASSIGNED|sessionVariableName|phraseWhenTrue[||phraseWhenFalse]~)
(~NOTASSIGNED|sessionVariableName|phraseWhenTrue[||phraseWhenFalse]~)
sessionVariableNameName of SessionLiteral or SessionTextArea to test. A SessionTextArea must be prefixed with "textarea." (eg. textarea.txtSample). (e)
phraseWhenTruePhrase to process if SessionLiteral is ASSIGNED{NOTASSIGNED} is true (a)
phraseWhenFalsePhrase to process if SessionLiteral is ASSIGNED{NOTASSIGNED} is false. (a)
CMDHASConditionally process a phrase if the whCommandString (in the incoming URL) contains a given text string.
Syntax
(~CMDHAS|stringToFind|phraseWhenTrue[||phraseWhenFalse]~)
stringToFindThis is the text string to look for inside whCommandString in the incoming URL. (n)
phraseWhenTruePhrase to process if string is found. (a)
phraseWhenFalsePhrase to process if string is NOT found. (a)
IF,IFNOTConditionally process a phrase based on a SessionBoolean setting.
Syntax
(~IF|sessionBooleanName|phraseWhenTrue[||phraseWhenFalse]~)
(~IFNOT|sessionBooleanName|phraseWhenTrue[||phraseWhenFalse]~)
sessionBooleanNameName of a SessionBoolean (an entry in the TWebSession.Checked array) to test. (e)
phraseWhenTruePhrase to process when IF{IFNOT} condition is true. (a)
phraseWhenFalsePhrase to process when IF{IFNOT} condition is false. (a)
IFINDWConditionally process a phrase based on whether content is being requested from inside Dreamweaver MX 2004.
Syntax
(~IFINDW|phraseWhenTrue[||phraseWhenFalse]~)
phraseWhenTruePhrase to process if the content is being requested from inside Dreamweaver MX 2004. (a)
phraseWhenFalsePhrase to process if the content is NOT being requested from inside Dreamweaver MX 2004. (a)
IFNOTBLANKSVConditionally process a phrase based on whether a stringvar contains a blank value. No warning when StringVar does not exist.
Syntax (v3.190+)
(~IFNOTBLANKSV|sessionStringVarName|phraseWhenTrue[||phraseWhenFalse]~)
sessionStringVarNameName of SessionStringVariable to test. If surrounded by parentils, the parameter will be expanded before using it to find the StringVar. (i)
phraseWhenTruePhrase to process if string variable is available (non-blank). (a)
phraseWhenFalsePhrase to process if string variable is blank or does not exist. (a)
ISWEBROBOTREQUESTConditionally process a phrase based on whether StreamCatcher has detected the current session as coming from a web robot.
Syntax
(~ISWEBROBOTREQUEST|phraseWhenTrue[||phraseWhenFalse]~)
phraseWhenTruePhrase to process if the current session is from a web robot. (a)
phraseWhenFalsePhrase to process if the current session is NOT from a web robot. (a)
MATCH,NOMATCHConditionally process a phrase based on the specified comparison of two strings.
Syntax
(~MATCH|string1<operator>string2|phraseWhenTrue[||phraseWhenFalse]~)
(~NOMATCH|string1<operator>string2|phraseWhenTrue[||phraseWhenFalse]~)
string1String1 for string1<operator>string2 comparison. (e)
<operator>Operator for string1<operator>string2 comparison (=,~,!,[,$). (n)
=case sensitive match
~case insensitive match
!starts with
[is contained in
$is distinctly in
string2String2 for string1<operator>string2 comparison. Use * for wildcard. (e)
phraseWhenTruePhrase to process if MATCH{NOMATCH} comparison holds true. (a)
phraseWhenFalsePhrase to process if MATCH{NOMATCH} comparison is false. (a)
Control of variables
APPSETTINGSet a custom configuration setting for the application.
Syntax
(~APPSETTING|key=value~)
keyName of APPSETTING to set. (e)
valueValue of APPSETTING to set. (e)
CHECKSet a single SessionBoolean variable (often a value corresponding to a checkbox) to true.
Syntax
(~CHECK|sessionBooleanName~)
sessionBooleanNameName of SessionBoolean (often a checkbox name) to set to True (i.e.check). (n)
CLEARRemove the named SessionLiterals and/or SessionBooleans from the list kept on TWhSession for the current surfer.
Syntax
(~CLEAR|sessionVariablesCommaSeparated~)
sessionVariablesCommaSeparatedComma separated list of SessionLiterals and/or SessionBooleans to clear (* wildcard allowed). (n)
CLEARLOCALVARRemove the named LocalSessionVariable from the list kept on TWhSession for the current surfer, for the current droplet.
Syntax (v2.071+)
(~CLEARLOCALVAR|localSessionVariableName~)
localSessionVariableNameName of LocalSessionVariable to clear (* wildcard allowed). (n)
PAGESETTINGSet a variable for the current page.
Syntax
(~PAGESETTING|key=value~)
keyName of PAGESETTING to set. (e)
valueValue of PAGESETTING to set. (e)
SETSet the value of one or more named SessionLiterals.
Syntax
(~SET|keyEqualValuePairsCommaSeparated~)
keyEqualValuePairsCommaSeparatedVariable(s) to set and their values as a comma separated Session['SessionLiteralName']=value list. (c)
SETLOCALVARSet the value of one or more named LocalSessionLiterals (automatically cleared when droplet ends).
Syntax (v2.071+)
(~SETLOCALVAR|key=value~)
keyName of LocalStringVariable to set. (e)
valueValue of LocalStringVariable to set. (e)
TOGGLEToggle the value of the named SessionBoolean between True and False
Syntax
(~TOGGLE|sessionBooleanName~)
sessionBooleanNameName of SessionBoolean to toggle between True and False. (n)
Export
IFDYNAMICProcess a phrase conditionally based on whether you are making a dynamic HTML page.
Syntax
(~IFDYNAMIC|phraseWhenTrue[||phraseWhenFalse]~)
phraseWhenTruePhrase to process if making a dynamic HTML page i.e. not exporting. (a)
phraseWhenFalsePhrase to process if NOT making a dynamic HTML page i.e. exporting. (a)
IFSTATICProcess a phrase conditionally based on whether you are making a static HTML page.
Syntax
(~IFSTATIC|phraseWhenTrue[||phraseWhenFalse]~)
phraseWhenTruePhrase to process if making a static HTML page i.e. exporting. (a)
phraseWhenFalsePhrase to process if NOT making a static HTML page i.e. not exporting. (a)
External Program Calls
SHELLRun an external program (with optional parameters) and wait for it to finish.
Syntax
(~SHELL|theProgram|theParameters~)
theProgramProgram to run (with full pathname). (e)
theParametersParameters to pass to the program to run. (e)
STARTStart an external program (with optional parameters) and return immediately.
Syntax
(~START|theProgram|theParameters~)
theProgramProgram to run (with full pathname). (e)
theParametersParameters to pass to the program to run. (e)
File Processing
INCLUDEInclude the contents of an entire whtml file (here) on the page.
Syntax
(~INCLUDE|fileName~)
fileNameFully qualified filename for inclusion of its contents in the page. (e)
SENDFILESend a single file as the response while hiding the file location from the surfer.
Syntax
(~SENDFILE|filename[,mimeType[,<deleteFlag>]]~)
filenameFile to send as fully qualified filename or relative server path. (e)
mimeTypeMIME type eg. image/png (e)
<deleteFlag>If you specify DELETE, then the file will be deleted after it is sent. (n)
blankNo do not delete
DELETEYes delete after sending
Flow Control
BOUNCEBounce the user to another resource (with protocol http,https,ftp or mailto) using HTTP redirection. For all except mailto, the URL in the browser address window changes.
Syntax
(~BOUNCE|bounceLocation~)
bounceLocationBounce location eg. [AppID:]PageID[,whCommandString] (for full syntax see the JUMP command) or eg. http://www.href.com/index.html or eg. //ServerName/index.html (e)
CLOSEClose the output stream and end the page here.
Syntax
(~CLOSE|~)
FLUSHClear (reset) the specified output-document buffer.
Syntax
(~FLUSH|<bufferName>~)
<bufferName>Buffer name to clear. (n)
outOutput buffer
headerHeaders accrued so far
summaryPage-Summary buffer
anchorsAnchors buffer
JUMPBACKGenerate a dynamic link to jump back to the prior AppID and PageID as defined onTWhSession.
Syntax
(~JUMPBACK|visiblePhrase~)
visiblePhraseVisible Phrase surfer will see for the link. (a)
PAGESwitch the surfer to a different page (PageID) within the application. The URL in the browser address window remains unchanged.
Syntax
(~PAGE|pageID[|commandForNewPageID]~)
pageIDAfter flushing the output buffer, switch to this PageID within the application. (e)
commandForNewPageIDwhCommandString to pass to PageID as if it came from the URL. (e)
POPPAGEBounce the surfer to the PageID that was previously stored in a specified SessionLiteral.
Syntax
(~POPPAGE|sessionLiteralName~)
literalNameName of SessionLiteral containing PageID to pop. (n)
PUSHPRIORSave prior PageID in a specified SessionLiteral. Use in conjunction with POPPAGE to implement pages or sequences that act as subroutines.
Syntax
(~PUSHPRIOR|literalName~)
literalNameName of SessionLiteral in which to store the prior PageID. (n)
PUSHTHISSave current PageID in a specified SessionLiteral. Use in conjunction with POPPAGE to implement pages or sequences that act as subroutines.
Syntax
(~PUSHTHIS|literalName~)
literalNameName of SessionLiteral in which to store the current PageID. (n)
REQUIRESBounce the surfer to another page if a named SessionLiteral is blank or a named SessionBoolean is false.
Syntax (v2.039+)
(~REQUIRES|sessionVariableName[|pageID]~)
sessionVariableNameName of SessionVariable to test (if SessionLiteral then bounce if blank, if SessionBoolean then bounce if false). (e)
pageIDOptional PageID for bounce (otherwise FrontDoor pageID else HomePage pageID). (e)
REQUIRESMATCHBounce the surfer to another page if a specified SessionLiteral does not satisfy the match comparison.
Syntax (v2.039+)
(~REQUIRESMATCH|sessionLiteralName<matchOperator>matchValue[|pageID]~)
sessionLiteralNameName of SessionLiteral to use in sessionLiteral<matchOperator>value comparison. (e)
<matchOperator><matchOperator> to use in sessionLiteral<matchOperator>value comparison (=,~,!). (n)
=exact case sensitive match
~case insensitive match
!must start with value
matchValueName of value to use in sesisonLiteral<matchOperator>value comparison. (e)
pageIDOptional PageID for bounce (otherwise FrontDoor pageID else HomePage pageID). (n)
Optimizing Code Re-Use
CRUNCHKEYSRename literals in a named set so there are no gaps.
Syntax
(~CRUNCHKEYS|sessionLiteralStem~)
sessionLiteralStemSessionLiteral stem for removing numeric siffix gaps in a literal set of the form SessionLiteralStem + number eg price1,price2. (i)
DECDecrement a literal that contains an integer (subtract 1 from the value).
Syntax
(~DEC|literalName~)
sessionLiteralNameSubtract 1 from the integer contents of this SessionLiteral. (n)
DELKEYSDelete SessionLiterals where their names are based on a specified pattern ending in a number.
Syntax
(~DELKEYS|commaSeparatedLiteralStemList~)
commaSeparatedLiteralStemListComma separated SessionLiteral stem list for deleting numeric suffixed literals that match eg a,b would delete a1,a2..aN and b1,b2,..bN. (i)
DYNCHUNKSend a droplet, translation or macro whose name is calculated dynamically.
Syntax
(~DYNCHUNK|[tekeroIDPrefix],suffixPhrase[,tempSessionLiteralStem][|params]~)
tekeroIDprefixPrefix of droplet,translation or macro (n)
suffixPhrasePhrase to append to TekeroIDPrefix to form the dynamic tekero ID. (e)
tempSessionLiteralStemSessionLiteral stem for temporary dynamic parameter literals that are passed to the dynamic tekero (eg. DYN). (n)
paramsComma separated parameters that are placed in the "TempSessionLiteralStem + number" SessionLiterals such as DYN1,DYN2 etc. (n)
FORProcess a For-loop. For all values between a start integer and end integer, process a specified phrase.
Syntax
(~FOR|loopSessionLiteralName,fromInteger,toInteger[:loopLiteralDisplayWidth]|phraseToProcess~)
loopSessionLiteralNameName of SessionLiteral to use for the for loop. (n)
fromIntegerLoop from the is integer value. (i)
toIntegerLoop to this integer value. (i)
loopLiteralDisplayWidthDisplay width of loop SessionLiteral eg a value of 4 would cause the loopLiteral value of 8 to display as "0008". (n)
phraseToProcessPhrase to process each iteration of the loop. (a)
INCIncrement a literal that contains an integer (add 1 to the value).
Syntax
(~INC|stringVarName~)
stringVarNameAdd 1 to the integer contents of this surfer-string-variable. (n)
LITReturn the value of a numbered StringVar.
Syntax
(~LIT|stringVarNameStem|number~)
stringVarNameStemStem for identifying StringVar to return the value of (eg price for priceX stringvars) (n)
numberNumber for identifying the StringVar to return the value of (eg 3 for price3 if StringVarNameStem were price) (e)
PARAMSSend a tekero, passing parameters that may be used within the tekero.
Syntax
(~PARAMS|tekeroID[,tempSessionLiteralStem[,separatorChar]]|parameterValueList~)
tekeroIDDropletID or PageID or MacroID or TranslationID to send. (n)
tempSessionLiteralStemOptional SessionLiteral stem for naming temporary parameter SessionLiterals. (a)
separatorCharOptional separator character for parameter list. (n)
parameterValueListParameter list separated by SeparatorChar (if specified) else a comma. (c)
Security
BOUNCEIFNOTSCHEME Force the use of a certain protocol such as HTTPS.
Syntax (v3.094+)
(~BOUNCEIFNOTSCHEME |<protocol>~)
protocolProtocol to assert, http or https. (n)
IFINACTIVEFORSECConditionally process a phrase if the session is inactive for a specified number of seconds.
Syntax
(~IFINACTIVEFORSEC|seconds|phraseWhenTrue[||phraseWhenFalse]~)
secondsNumber of seconds to use for determining session inactivity. (e)
phraseWhenTruePhrase to process if session is inactive for specified seconds. (a)
phraseWhenFalsePhrase to process if session is still active (activity occurred within specified seconds). (a)
SESSIONControl aspects of the the session savestate including the session file's date/time stamp.
Syntax
(~SESSION|<sessionAction>[|DateTime]~)
<sessionAction>Required action for the session/sessions (Save,Delete,Touch,PlaceHolder,Time,Ignore) (n)
SaveSave session var file now
DeleteDelete session var file when page is sent
TouchSet timestamp on session var file (lose most recent changes)
PlaceHolderCreate an empty session file
TimeSet timestamp on session var file (keep most recent changes)
IgnoreDo nothing after session finishes
dateTimeDateTime to be used by the chosen session action formatted as dd-mm-yyyy hh:nn:ss (use server time) (e)
SESSIONHOUSECLEANCompact the memory used by all sessions and expire old sessions from memory.
Syntax (v2.039+)
(~SESSIONHOUSECLEAN|~)
CODE64STRINGBase64 encode the value.
Syntax (v3.184+)
(~CODE64STRING|inText~)
inTextPhrase to encode using base64. (e)
Special
ANCHORRemember a position within the output document by name (and any optional required Anchors before sending contents).
Syntax
(~ANCHOR|anchorName[,requiredAnchor]~)
anchorNameName of Anchor to set and remember position of. (n)
requiredAnchorThe Anchor named AnchorName will only be set if this Anchor is non-blank. (n)
ANCHORMODIFYSubstitute content into a remembered ANCHOR position.
Syntax (v2.039+)
(~ANCHORMODIFY|anchorName[,<modifyMethod>]|phraseToApply~)
anchorNameName of anchor to modify. (n)
<modifyMethod>Method to use when modifying the anchor content. (n)
uniqueadd as new unique text
replacereplace entire anchor with given text
removeremove text (if a match) from the anchor
phraseToApplyPhrase to apply to named anchor using the selected modify method. (e)
Output Commands
Database
FIELDDisplay the contents of a named field for the current database record in a specified datasource.
Syntax
(~FIELD|dataSource|fieldName[|formatStr]~)
dataSourceName of a TDataSource or WebHub-WebDataSource. (n)
fieldNameName of a field in the TDataSet pointed to by the DataSource. (n)
formatStrDelphi format string to be used with data from numeric, currency and datetime fields. (v2.184+) (n)
Documentation
CMDDisplay dynamic content (as source or expanded content) based on the whCommandString from the incoming URL.
Syntax
(~CMD|<displayMode>~)
<displayMode>Display the source behind (asSource) or fully expanded version (asExpanded) of the WHTML tekero. (n)
asSourcedisplay as source
asExpandeddisplay fully expanded
SOURCEDisplay the WebHub HTML source behind a tekero, for training purposes.
Syntax
(~SOURCE|tekeroName~)
tekeroNameDroplet or Page or Translation for which to display source. (n)
SUMMARYAdd text to the WebHub page-footer (after all sections are sent).
Syntax
(~SUMMARY|summaryText~)
summaryTextText to add to the page-footer. (e)
Export
DYNACTIONForce a dynamic action attribute in a <form action="~~~"...> opening tag heading to a WebHub PageID.
Syntax
(~DYNACTION|pageID~)
pageIDPageID of dynamic page to link back into from an exported static page. (n)
DYNJUMPUse this to link to the dynamic version of a PageID, from an exported static page.
Syntax
(~DYNJUMP|[appID:][pageID][(serverProfileID)][,whCommandString][|additionalAttributes]|visiblePhrase~)
appIDAppID for generated link. (n)
pageIDPageID for generated link. (n)
serverProfileIDServerProfileID for generated link. (n)
whCommandStringwhCommandString to include in generated link. (a)
additionalAttributesAttributes to include in generated link. (a)
visiblePhraseVisible portion of the generated <a href...>~~~</a> tag. (a)
STATICJUMPGenerate a link <a href...>~~~</a> to the static version of a page (ExportURL + ExportFileName)
Syntax
(~STATICJUMP|[appID:][pageID][(serverProfileID)][,whCommandString][|additionalAttributes]|visiblePhrase~)
appIDAppID for generated link. (n)
pageIDPageID for generated link. (n)
serverProfileIDServerProfileID for generated link. (n)
whCommandStringwhCommandString to include in generated link. (a)
additionalAttributesAttributes to include in generated link (and static="static" if required). (a)
visiblePhraseVisible portion of the generated <a href...>~~~</a> tag. (a)
Forms
ACTION,ACTIONRGenerate a dynamic URL commonly used for the action attribute of a <form action="~~~"...> opening tag. Use ACTIONR for a random session suffix.
Syntax
(~ACTION|[appID:]pageID[(serverProfileID)][,whCommandString]~)
(~ACTIONR|[appID:]pageID[(serverProfileID)][,whCommandString]~)
appIDAppID for generated dynamic URL. (n)
pageIDPageID for generated dynamic URL. (n)
serverProfileIDServerProfileID for generated dynamic URL. (n)
whCommandStringwhCommandString to include in generated dynamic URL. (a)
INPUTCHECKBOXGenerate an <input type="checkbox" name="x" value="yes" {checked="checked" depending on (~x~)}... /> tag.
Syntax
(~INPUTCHECKBOX|checkboxName[|additionalAttributes]~)
checkboxNameName attribute for <input type="checkbox"... /> tag. (a)
additionalAttributesAdditional attributes for <input type="checkbox"... /> tag. (a)
INPUTDEFAULTGenerate the default value for any input tag
Syntax (v3.208+)
(~INPUTDEFAULT|varName~)
varNameName of the stringvar or txtvar containing the default value. This should match the name attribute of the input tag or textarea. For txtvar support, use 'txtvar.' prefix. (e)
INPUTFILEGenerate an <input type="file" name="x"... /> tag for uploading files to a server.
Syntax
(~INPUTFILE|nameAttribute[,acceptAttribute][|additionalAttributes]~)
nameAttributename attribute for <input type="file"... /> tag. (a)
acceptAttributeaccept attribute for <input type="file"... /> tag eg text/html. (a)
additionalAttributesAdditional attributes for <input type="file"... /> tag. (a)
INPUTHIDDENGenerate an <input type="hidden" name="x" value="(~x~)"... /> tag.
Syntax
(~INPUTHIDDEN|nameAttribute[|additionalAttributes]~)
nameAttributename attribute for <input type="hidden"... /> tag. (a)
additionalAttributesAdditional attributes for <input type="hidden"... /> tag. (a)
INPUTIMAGEGenerate an <input type="image" name="x" value="(~x~)"... /> tag.
Syntax
(~INPUTIMAGE|nameAttribute,srcAttribute[|additionalAttributes]~)
nameAttributename attribute for <input type="image"... /> tag. (a)
srcAttributesrc attribute for <input type="image"... /> tag. (a)
additionalAttributesAdditional attributes for <input type="image"... /> tag. (a)
INPUTPASSWORDGenerate an <input type="password" name="x" value="(~x~)"... /> tag.
Syntax
(~INPUTPASSWORD|nameAttribute[|additionalAttributes]~)
nameAttributename attribute for <input type="password"... /> tag. (a)
additionalAttributesAdditional attributes for <input type="password"... /> tag. (a)
INPUTRADIOGenerate an <input type="radio" name="x" value="yes" {checked="checked" depending on (~x~)}... /> tag.
Syntax
(~INPUTRADIO|nameAttribute,valueAttribute[|additionalAttributes]~)
nameAttributename attribute for <input type="radio"... /> tag. (a)
valueAttributevalue attribute for <input type="radio"... /> tag. (a)
additionalAttributesAdditional attributes for <input type="radio"... /> tag. (a)
INPUTRESETGenerate an <input type="reset" name="x" value="(~x~)"... /> button tag.
Syntax
(~INPUTRESET|nameAttribute,valueAttribute[|additionalAttributes]~)
nameAttributename attribute for <input type="reset"... /> tag. (a)
valueAttributevalue attribute for <input type="reset"... /> tag. (a)
additionalAttributesAdditional attributes for <input type="reset"... /> tag. (a)
INPUTSELECTGenerate a <select...> tag based on a list. Multiple selection can be specified.
Syntax
(~INPUTSELECT|nameAttribute,nameOfCommaSeparatedList,sizeAttribute[,<isMultiple>][|additionalAttributes]~)
nameAttributename attribute for <select...> tag. Do not use underscores in the name. (a)
nameOfCommaSeparatedListName of a macro containing a comma separated list of "RealValue-DisplayValue" pairs in a string, or the name of a droplet containing key-value pairs separated by CRLF (i)
sizeAttributesize attribute for <select...> tag. (i)
<isMultiple>Choose Yes to allow selection of multiple items from the list (default No) (n)
blankNo
yesYes
additionalAttributesAdditional attributes for <select...> tag. (a)
INPUTSELECTRADIOGenerate a series of radio buttons <input type="radio" name="x" value="yes" {checked="checked" depending on (~x~)}... /> based on a list.
Syntax
(~INPUTSELECTRADIO|nameAttribute,keyDashValueListName[,textBefore[,textAfter]][|additionalAttributes]~)
nameAttributeName attribute for radio buttons <input type="radio" name="~~~"... />. (a)
keyDashValueListNameName of Macro or Droplet with a list of 'key dash value' pairs (i)
textBeforeText to display before each radio button (a)
textAfterText to display after each radio button (a)
additionalAttributesAdditional attributes for radio button tags. (a)
INPUTSELECTCHECKBOXGenerate a series of checkboxes <input type="checkbox" name="stem_X" value="yes" {checked="checked" depending on (~stem_X~)}... /> based on a list.
Syntax
(~INPUTSELECTCHECKBOX|nameAttribute,keyDashValueListName[,textBefore[,textAfter]][|additionalAttributes]~)
nameAttributeStemStem for name attribute for checkboxes <input type="checkbox" name="stem_X"... />, X=1,2,3,4 etc. (a)
keyDashValueListNameName of Macro or Droplet with a list of 'key dash value' pairs (i)
textBeforeText to display before each checkbox (a)
textAfterText to display after each checkbox (a)
additionalAttributesAdditional attributes for checkbox tags. (a)
INPUTSUBMITGenerate an <input type="submit"... /> button tag.
Syntax
(~INPUTSUBMIT|nameAttribute,valueAttribute[|additionalAttributes]~)
nameAttributename attribute for <input type="submit"... /> button tag. (a)
valueAttributevalue attribute for <input type="submit"... /> button tag. (a)
additionalAttributesAdditional attributes for <input type="submit"... /> button tag. (a)
INPUTTEXTCreate an <input type="text" name="x" value="(~x~).. /.> tag.
Syntax
(~INPUTTEXT|nameAttribute[,sizeAttribute[,maxlengthAttribute]][|additionalAttributes]~)
nameAttributename attribute for <input type="text"... /> tag. (a)
sizeAttributesize attribute for <input type="text"... /> tag. (a)
maxlengthAttributemaxlength attribute for <input type="text"... /> tag. (a)
additionalAttributesAdditional attributes for <input type="text"... /> tag. (a)
INPUTTEXTAREAGenerate a <textarea name="x"...>{~x~)</textarea> tag.
Syntax
(~INPUTTEXTAREA|nameAttribute,rowsAttribute,colsAttribute[|additionalAttributes]~)
nameAttributename attribute for <textarea name="x"...>{~x~)</textarea> tag. (a)
rowsAttributerows attribute for <textarea...> tag. (a)
colsAttributecols attribute for <textarea...> tag. (a)
additionalAttributesAdditional attributes for <textarea...> tag. (a)
Navigation
GO,GORGenerate a dynamic link which will be inactive if pointing at the current page. Use GOR for a random session suffix.
Syntax
(~GO|[appID:][pageID][(serverProfileID)][,whCommandString][|additionalAttributes]|visiblePhrase[||VisiblePhraseIfSamePageID]~)
(~GOR|[appID:][pageID][(serverProfileID)][,whCommandString][|additionalAttributes]|visiblePhrase[||VisiblePhraseIfSamePageID]~)
appIDAppID for generated link. (n)
pageIDPageID for generated link. (n)
serverProfileIDServerProfileID for generated link. (n)
whCommandStringwhCommandString to include in generated link. (a)
additionalAttributesAttributes to include in generated link. (a)
visiblePhraseVisible portion of the generated <a href...> tag if not on PageID (a)
visiblePhraseIfSamePageIDVisible portion of the generated <a href...> tag if on same PageID (optional) (a)
HIDE,HIDERGenerate a link which will be hidden if pointing at the current page. Use HIDER for a random session suffix.
Syntax
(~HIDE|[appID:][pageID][(serverProfileID)][,whCommandString][|additionalAttributes]|visiblePhrase[||VisiblePhraseIfSamePageID]~)
(~HIDER|[appID:][pageID][(serverProfileID)][,whCommandString][|additionalAttributes]|visiblePhrase[||VisiblePhraseIfSamePageID]~)
appIDAppID for generated link. (n)
pageIDPageID for generated link. (n)
serverProfileIDServerProfileID for generated link. (n)
whCommandStringwhCommandString to include in generated link. (a)
additionalAttributesAttributes to include in generated link. (a)
visiblePhraseVisible portion of the generated <a href...>~~~</a> tag if not on PageID (a)
visiblePhraseIfSamePageIDVisible portion of the generated <a href...>~~~</a> tag if on same PageID (optional) (a)
JUMP,JUMPRGenerate a dynamic link to a page within a WebHub application. Use JUMPR for a random session suffix.
Syntax
(~JUMP|[appID:][pageID][(serverProfileID)][,whCommandString][|additionalAttributes]|visiblePhrase~)
(~JUMPR|[appID:][pageID][(serverProfileID)][,whCommandString][|additionalAttributes]|visiblePhrase~)
appIDAppID for generated link. (n)
pageIDPageID for generated link. (n)
serverProfileIDServerProfileID for generated link. (n)
whCommandStringwhCommandString to include in generated link. (a)
additionalAttributesAttributes to include in generated link. (a)
visiblePhraseVisible portion of the generated <a href...>~~~</a> tag. (a)
MAILTOCreate a mailto link.
Syntax
(~MAILTO|emailAddress[|visiblePhrase[|<asNumeric>]]~)
emailAddressemail address for mail to link. (a)
visiblePhraseVisible phrase for mailto link. (a)
<asNumeric>Set True to deter spam list engines from noticing the email address. Defaults to No. (n)
blankFalse
TrueTrue
WebHub Command Syntax Definition - Legend
All WebHub Commands syntax definitions have the format
(~RESERVEDCOMMANDNAME|parameters~)
The surrounding (~ ~) characters are called parentils, and these delimiters are used for all WebHub Expressions (see below).
For built-in WebHub Commands, the RESERVEDCOMMANDNAME is a reserved word that WebHub uses to activate a specific feature.
The RESERVEDCOMMANDNAME is followed by a vertical bar |which is followed by none, one or more than one parameters.
For syntax definition purposes, all parameters are given names (eg. phraseWhenTrue) using alpha-numeric characters without any spaces.
A parameter name surrounded by < > characters (eg. <operator> means that it is an enumerated type, and the possible values are shown in the syntax parameter definition. The < > characters are only included to identify the parameter as an enumerated type and do not form part of the command syntax.
Some parameters are optional, and this is indicated by the surrounding [ ] characters and a highlighting background color (eg. [||phraseWhenFalse]).
All non-alpha-numeric characters (except [ ] and <>) such as | , # ; ! $ ~ (when shown) are a required part of the command syntax.
When the word Phrase is used in a command parameter name or parameter definition, this means a mixture of html, text and/or WebHub Expressions.
When a parameter can itself be a WebHub Expression, nesting of expressions is allowed to a depth of 40.
WebHub Application Server System - A brief overview
A WebHub Application Server System provides dynamic content for web pages using a collection of interactive software components. These components are:
Operating System eg. Windows Server 2003
http Server Software eg. IIS 6
WebHub WebServer Module eg. runisa.dll for IIS (from HREF Tools Corp).
WebHub Service hub.exe (from HREF Tools Corp).
WebHub Application(s) compiled Object Pascal program. This is an EXE file
WebHub whteko filesFiles containing a mixture of WebHub xml tags, html content and WebHub Expressions.
Optional database(s) / service(s)Optional database, COM, services and other applications.
WebHub Applications and whteko files can be completely tailored by a developer or development team. WebHub's architecture lends itself to an easy separation of database connectivity, programming logic and business rules managed by the "programmer" skill-set of a team (or individual), and the visual presentation, navigation, and site layout managed by the "webmaster or graphic designer" skill-set.
The following information is focused on WebHub Expressions as used within the WebHub whteko files.
WebHub Expressions
WebHub Expressions are used within HTML markup to:
1. dynamically insert content into a web page while it is being generated by a WebHub Application (WebHubApp), and
2. interact directly with a WebHubApp's logic and data.
The server-side source is called W-HTML and is generally stored in *.whteko files which can contain a collection of WebHub tekeros (pronounced tek-air-oze). The tekeros are pages, droplets, translations and macros that are defined using special syntax xml tags (called teko tags) within whteko files. All of these tekeros can use WebHub Expressions mixed with HTML.
For information on the teko syntax, see webhubsyntaxstage0214.pdf
A WebHub Expression is any sequence of commands and nested expressions surrounded by parentils.
Parentils are the delimiters (~ and ~). These are used to distinguish a dynamic WebHub expression from the surrounding html and are used for nesting expressions within expressions.
There are 5 basic types of atomic (non-nested) WebHub Expressions.
Command a built-in or a custom commandeg. (~CLEAR|~)
Tekero a page, droplet, translation or macroeg. (~drPageHeader~)
Session variable a SessionLiteral or SessionBooleaneg. (~slUserName~)
WebAction Methoda method of a WebAction componenteg. (~waWebAction.Execute|~)
Component Propertya property of a Delphi componenteg. (~WebServer.WebTime~)
Expressions can be nested to a depth of 40.
Naming Conventions in WebHub Expressions - Best Practices
WebHub expression types look very similar at first glance.
For example:
1. a Command (~Text|moreText~)
2. a Tekero (~Text~)
3. a Session variable (~Text~)
4. a WebAction Method (~Text|moreText~)
5. a Component Property (~Text~)
Because of this similarity, developers are encouraged to use best practices naming conventions as follows:
1. naming Commands
For Custom Commands that you implement in Object Pascal, choose a prefix (perhaps your product's initials)
eg. tp prefix for a product called TurboPress (~tpHEADLINE|moreText~)
2. naming Tekeros
Distinguish between tekero types by using the following prefixes:
dr for droplets eg. (~drPageHeader~)
mc for macros eg. (~mcSiteRoot~)
pg (or blank) for pages eg. (~pgAdminMenu~) or (~AdminMenu~)
~ for translations (this is a required prefix) eg. (~~city~)
Because the pg will be included as part of the page name in the URL, the pg prefix is usually only used for training demos or on in-house non-public pages. If no page prefix is used, then page expressions are only identifiable as pages if all other WebHub Expression types use the best-practices prefix approach.
3. naming Session Variables
Session variables require a carefully thought out strategy for prefixing.
The simplest form might be:
svVarNamewhere sv is a prefix that stands for session variable
Session variables can be SessionLiterals or SessionBooleans, so a more useful approach might be:
slVarNamewhere sl stands for SessionLiteral (a string variable)
sbVarNamewhere sb stands for SessionBoolean (true / false variable)
Furthermore, SessionLiterals can be set (or cleared) within WHTML, or set after a form has been posted by a site visitor. In the latter case, these incoming variables could be efficiently cleared using a wildcard approach, so one possible idea is to use:
inFormNameVarNamewhere in means input data and FormName is the name of the form containing the input field named inFormVarName. A group of session variables, so named on the form FormName, could all be cleared using (~CLEAR|inFormName*~)
For dynamic database driven applications, another approach is as follows:
inDataSetNameTextwhere "in" means input data and DataSetName is the name of the DataSet for which the contents of the input field named inTableNameText is to be used for querying or updating or inserting.
Lastly, but most importantly, a "_" prefix for any session variable name means that the site visitor is unable to change the session variable's contents i.e. only server side modifications are possible using either Delphi code or WEbHub commands such as (but not limited to) SET,CLEAR,CHECK and TOGGLE.
eg. _sbLoggedIn as a protected SessionBoolean that indicates the logged in status of a site visitor.
If in doubt, start with a prefix of sv, and refine your approach over time as your application evolves. A mixture of techniques is often beneficial in terms of readability and convenience.
4. naming WebAction Methods
For a WebAction Method
(i) within Object Pascal, prefix the WebAction component name with "wa"
(ii) specify the "method" name even if it is "Execute". (Execute is the default method and is implied but should be specified)
(iii) use the vertical bar after the method name even if no parameters are being passed to the webaction
eg. (~waWebActionName.Execute|moreText~) or (~waWebActionName.Execute|~)
5. naming Component Properties
For Component Properties, include the component name and a "." as a prefix, even though this is not required.
eg. instead of (~WebTime~) use (~WebServer.WebTime~)
WebHub Command Syntax
All WebHub Commands have the syntax (~command|parameters~) where
command is a reserved word representing either a built-in WebHub feature or a custom feature (defined by a developer), in both cases serviced by the WebHubApp
parametersis a predefined sequence of required and optional Phrases that vary according to the command used. A Phrase is a mixture of html, text and/or WebHub expressions.
Consider the WebHub Command IF
Syntax
(~IF|sessionBooleanName|phraseWhenTrue[||phraseWhenFalse]~)
sessionBooleanNameName of a SessionBoolean (an entry in the TWebSession.Checked array) to test.
phraseWhenTruePhrase to process when IF condition is true.
phraseWhenFalsePhrase to process when IF condition is false.
An example of using the IF command in a WebHub Expression within a whteko file might be:
(~IF|_sbLoggedIn|(~JUMP|UserDetails|My Details~)|| ~)~)
A full analysis of this expression is as follows:
From the range of WebHub Expression types (Command, Tekero, Session Variable, WebAction Method, Component Property), this expression can be identified as either a Command or WebAction Method because it has the format of (~Text|moreText~). More specifically the format is (~IF|moreText~) where IF is a reserved word and is a WebHub Built-In Command, so this expression is a Command.
Analysis as syntax:
Referring to the above syntax specification for the IF command, the command's parameters are:
sessionBooleanName_sbLoggedIn
phraseWhenTrue(~JUMP|UserDetails|My Details~).
phraseWhenFalse
The phrase to process when true is a nested WebHub Expression and is in fact a JUMP command.
The phrase to process when false is standard html in this case.
Analysis in words:
If the protected SessionBoolean named _sbLoggedIn is true then generate an <a href...>~~~</a> tag where the href attribute equals the dynamic url required to navigate the site visitor to the UserDetails page within the current application, and where the visible text of the link will say "MyDetails", else, generate a non-breaking space.
The generated tag would look something like:
<a href="/scripts/runisa.dll?AppID:UserDetails:12345">My Details</a>
Analysis in over-simplified pseudo code:
if (_sbLoggedIn == true)
write('<a href="/scripts/runisa.dll?AppID:UserDetails:12345">My Details</a>')
else
write(' ');
Analysis in illustrative but not recommended Object Pascal:
if pWebApp.Checked['_sbLoggedIn'] then
WebOutput.Send(
'<a href="'
+ pWebApp.cgiApp + ':' {this generates /scripts/runisa.dll?AppID}
+ 'UserDetails:'
+ IntToStr(pWebApp.Session) {this generates 12345}
+ '">My Details</a>')
else
WebOutput.Send(' ');
Analysis in best practices Object Pascal
if pWebApp.Checked['_sbLoggedIn'] then
WebOutput.SendJump('UserDetails','My Details');
else
WebOutput.Send(' ');