PxPlus Wiki

Restricted Wiki Codes

The PxPlus Wiki engine provides additional functionality that allows pages to directly access and execute system logic. All of these codes consist of <pxpwiki> HTML tags inside the Wiki text.

Only users with Admin privileges can add or edit pages with these codes. This helps to assure the security of the system.

Below is a list of pxpwiki codes:

pxpwiki Code

Description

<pxpwiki=xxxxxx>

This tag will be replaced with the results of PxPlus evaluating the string identified by the expression supplied, xxxxxx.

The expression can be any value or PxPlus string expression. If an error occurs during the evaluation of the expression, the Wiki engine will insert *ERR*.

If desired, you can use the XEQ function to call an external application program to compute/return the value.

Note:
The string returned by the expression is itself considered Wiki code and not HTML; therefore, it will be processed by the Wiki engine prior insertion in the page.

<pxpwiki:=xxxxxx>

This is similar to the <pxpwiki=xxxxxx> tag; however, the result of the expression evaluation is considered raw HTML code and will not be passed to the Wiki engine.

<pxpwiki:user:xxxxxx>

This tag causes the page to only be displayed if the user is a member of the class specified by xxxxxx.

<pxpwiki:error>

This tag inserts code to display an alert should the internal variable err_msg$ be set to non-null; otherwise, it is ignored.

Page Layout Codes

How the Code is used by the Main Layout Page

<pxpwiki:page>

Internal page name of the page being presented.

<pxpwiki:text>

Inserts the resultant HTML contents for the page being presented.

<pxpwiki:title>

Inserts the title of the page being presented.

<pxpwiki:wiki>

Inserts the original Wiki text of the page being presented (not generally used).

Page Editor Codes

How the Code is used by the Wiki Page Editor

<pxpwiki:edithtml>

Inserts the resultant HTML contents for the page being edited.

<pxpwiki:editpage>

Inserts the internal page name for the page being edited.

<pxpwiki:edittitle>

Inserts the title of the Wiki page being edited.

<pxpwiki:editwiki>

Inserts the contents of the current page being edited.

<pxpwiki:message>

Inserts the error message (if any) on the editor page.

All other pxpwiki:xxxxxx codes will be replaced by the contents of the page whose internal name matches the tags.

Example:

A tag of <pxpwiki::style.css> would insert the contents of the page pxpwiki::style.css.

Note:
For consistency, the xxxxxx generally starts with a : (colon), resulting in page names with two colons (e.g. pxpwiki ::xxxxxx), although this is not a strict requirement.