This page (revision-1) was last changed on 29-Nov-2024 16:16 by UnknownAuthor

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 added 76 lines
[{TableOfContents}]
!! Variable evaluation order
The variables are evaluated in the following order:
# 'Preset' variables (or constants), as those listed on this page.
# 'Context' variables, as those set by plugins and tags.
# 'Property' variables, like those set in jspwiki.properties.
# 'Page' variables, like those set using the "SET" directive.
%% \\
!!! Overview
[{$pagename}] are variables that are evaluated when a page is viewed.
The two types of [{$pagename}] are defined below.!! Page Variables
Starting with JSPWiki 2.2, you can use the "SET" directive to define a variable that exists only in the page.
\\
You can access this value anywhere __on your page__ by using the shorthand "[[{$foo}]".\\
_%%information
Page Variables are effective when set in anyplace on the page regardless of the order. Setting a Page Variables at the bottom of the page implies it will work anyplace on the page.
%%
Accessing Page [{$pagename}] "[[{$test}]" before it is set:\\
test = [{$test}]\\
Then setting 'foo' to 'bar' For [example]:
\\
{{{
[{SET foo='bar'}]
}}}
creates you a variable called "foo", which has the value of "bar".
[{SET foo='bar'}]
Accessing "[[{$foo}]" After it is set:\\
foo = [{$foo}] \\
!! Pre-defined Variables
%%zebra-table
%%sortable
%%table-filter
||Variable||Description||Value||Code
|applicationname|This is the name of this Wiki. It has been set by the administrator in "jspwiki.properties".|''[{$applicationname}]''|{{{[{$applicationname}]}}}
|baseurl|The base URL address for this wiki|''[{$baseurl}]''|{{{[{$baseurl}]}}}
|encoding|Describes the character encoding used in this Wiki. An encoding of "UTF-8" means that the Wiki accepts any character, including Chinese, Japanese, etc. Encoding "ISO-8859-1" means that only western languages are supported.|''[{$encoding}]'''|{{{[{$encoding}]}}}
|inlinedimages|Lets you know which image types are able to be inlined|''[{$inlinedimages}]''|{{{[{$inlinedimages}]}}}
|interwikilinks|Writes HTML code for supported InterWiki links|''[{$interwikilinks}]''|{{{[{$interwikilinks}]}}}
|jspwikiversion|Inserts the version number of the JSPWiki engine.|''[{$jspwikiversion}]''|{{{[{$jspwikiversion}]}}}
|loginstatus|Shows the status of the current logged-in user|''[{$loginstatus}]''|{{{[{$loginstatus}]}}}
|uptime|Inserts the amount of time since this Wiki has been last restarted|''[{$uptime}]''|{{{[{$uptime}]}}}
|pagename|Inserts the current page name.|''[{$pagename}]''|{{{[{$pagename}]}}}
|pageprovider|The current PageProvider|''[{$pageprovider}]''|{{{[{$pageprovider}]}}}
|pageproviderdescription|A verbose, HTML description about the currently used page provider|''[{$pageproviderdescription}]''|{{{[{$pageproviderdescription}]}}}
|requestcontext|The current RequestContext|''[{$requestcontext}]''|{{{[{$requestcontext}]}}}
|totalpages|The total number of pages available in this Wiki|''[{$totalpages}]''|{{{[{$totalpages}]}}}
|username|Inserts the current user name|''[{$username}]''|{{{[{$username}]}}}
|inlinedimages|Inlined images on [{$applicationname}]|''[{$inlinedimages}]''|{{{[{$inlinedimages}]}}}
|pagefilters|Installed [PageFilters]|''[{$pagefilters}]''|{{{[{$pagefilters}]}}}
/%
/%
/%
! Inserting JSPWiki properties
You can also access some of the [JSPWiki properties] (that have been defined by the site maintainer) by using their property names directly. See [SystemInfo] for an example.
Note that some properties might not be accessible due to security reasons.
You can also obtain some data from the [JSPWiki Plugins].
Needs more info on how to set global variables in jspwiki.properties. I cannot find how anywhere..
!! Category
%%category [JSPWiki-2.10.3]%%
!! More Information
There might be more information for this subject on one of the following:
[{ReferringPagesPlugin before='*' after='\n' }]