Skin Template Tokens

Placeholders expanded by Foswiki scripts when generating output

Overview

Template Tokens are written exactly like Foswiki macros, but they are local to the script / template expansion process and can not be used elswhere in Foswiki topics. Each Foswiki script might have it's own unique set of tokens. A token that is expanded by the view script would most likely not be expanded by the attach script.

Unlike Foswiki Macros, tokens do not support {...} parameters. They are merely a placeholder that is replaced by the script.

TIP Note: The SEARCH macro also uses tokens in the search templates, %however they are in the format of $token.

Foswiki scripts

attach script

%ATTACHTABLE%  
%FILEUSER%  
%FILENAME%  
%HIDEFILE%  
%FILEPATH%  
%FILECOMMENT%  

change script

%REPEAT%  
%TEXT%  
%TOPICNAME%  
%AUTHOR% The web qualified WikiName of the change
%TIME%  
%REVISION%  
%TEXTHEAD%  
$wikiname The <nop> escaped WikiName of the change

edit script

%FORCENEWREVISIONCHECKBOX%  
%NEWTOPIC%  
%TEMPLATETOPIC%  
%REDIRECTTO%  
%ORIGINALREV%  
%TOPICPARENT%  
%FORMTEMPLATE%  
%CMD%  
%FORMFIELDS%  
%UNENCODED_TEXT%  
%TEXT%  

manage script

%TEXT%  
%ORIGINALREV%  

oops script

%PARAMn%  
%INSTANTIATE%  

preview script

%DONTNOTIFYCHECKBOX%  
%FORCENEWREVISIONCHECKBOX%  
%CMD%  
%REDIRECTTO%  
%FORMTEMPLATE%  
%FORMFIELDS%  
%TOPICPARENT%  
%HIDDENTEXT%  
%CMD%  
%ORIGINALREV%  
%TEXT%  

rdiff script

%REVTITLE1%  
%REVTITLE2%  
%REVINFO1%  
%REVINFO2%  
%REPEAT%  
%TEXT%  
%TAIL%  
%CURRREV%  
%MAXREV%  

register script

registerconfirm.tmpl
Sent to new user to validate the email address.
registerfailednotremoved.tmpl
Email to the Astro Wiki Administrator that the registernotify email failed, suggesting fradulent registration. User account not removed.
registerfailedremoved.tmpl
Email to the Astro Wiki Administrator that the registernotify email failed, and the registration was remived
registernotifyadmin.tmpl
Email to Astro Wiki Administrator that registration completed successfully
registernotify.tmpl
Email to new user that registration completed successfully

%SPLIT% Used to divide the NewUserTemplate topic into 3 sections: header, repeating keys, and footer. Not referenced in skin templates
%FIRSTLASTNAME% First and last name of the user registering.
%WIKINAME% Wikiname of the new user
%EMAILADDRESS% Email address of the new user
%FORMDATA% Registration form data, not expanded in registerconfirm.tmpl
%LOGINNAME% Login username used with external authentication
%INTRODUCTION% Unused. If passed in as a URL parm Introduction on the register request, will be passed on to the email message.
%VERIFICATIONCODE% The verification password send in the registerconfirm.tmpl use to confirm the email address is valid
%PASSWORD% User password - not used in current templates. Password is expanded in the %FORMDATA% depending upon the setting of {Register}{HidePasswd} in LocalSite.cfg

rename script

moveattachment.tmpl
Prompts for renaming or moving an attachment
rename.tmpl
Prompts for newattachment, newtopic, newweb, and the submit button
renameconfirm.tmpl
Prompts rename/move or cancel
renamedelete.tmpl
Promps for renamed topic name and delete or cancel
renameweb.tmpl
Prompts for new webname and Rename/Move or cancel
renamewebconfirm.tmpl
x
renamewebdelete.tmpl
x
param{'template')
Accepts template name from query?

%FILENAME%  
%NEW_FILENAME%  
%NEW_WEB%  
%NEW_TOPIC%  
%GLOBAL_SEARCH%  
%LOCAL_SEARCH%  
%SEARCH_COUNT%  
%NEW_PARENTWEB%  
%NEW_SUBWEB%  
%TOPIC%  
%MOVE_LOCKED%  
%REF_DENIED%  
%REF_LOCKED%  
%RENAMEWEB_SUBMIT%  

rest script

ALERT! rest does not use any templates

save script

ALERT! save does not use any templates

search script

ALERT! search is deprecated, and redirects to the view script

statistics script

ALERT! statistics does not use any templates

upload script

ALERT! upload does not use any templates

viewfile script

ALERT! viewfile does not use any templates

view script

%REVTITLE%  
%REVARG%  
%REVISIONS%  
%QUERYPARAMSTRING%  
%TEXT%  
%STARTTEXT%  
%ENDTEXT%  


Related Topics: Skins Macros JavascriptFiles
Topic revision: r1 - 17 Jun 2022, ProjectContributor
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback