Skip to content

Modules ​

Modules add dynamic content to a page: lists of pages, ratings, the forum, forms, site activity and more. This document lists every module ProjectWikit provides, with its parameters and examples. For general wikitext, see Syntax.

Placing a module ​

A module without a body is written on one line:

text
[[module Rate]]

A module with a body has a closing tag. The body is a template that the module fills in:

text
[[module ListPages category="news" limit="5"]]
* %%title_linked%%
[[/module]]
  • Module names are case-insensitive: [[module ListPages]], [[module listpages]] and [[module LISTPAGES]] are the same.
  • Parameter names are case-insensitive: perPage and perpage are the same. Parameter values are case-sensitive unless a module says otherwise.
  • Put values in double quotes: category="news".
  • Parameters a module does not list are ignored.
  • [[module654 ...]] is accepted as another spelling of [[module ...]].
  • Except for Button, a module's output is a block of its own. Written in the middle of a sentence, it still starts on a new line.

Where modules work ​

  • In page content, including pages pulled in with [[include]] and category templates (category:_template). A module in an included page acts on the page that includes it. For example, [[module Rate]] in an included component rates the including page.
  • Not in forum posts.
  • In the site footer license text (see Site administration), only [[module Time]] works.

Modules inside modules ​

A module body can contain other modules, including ones with a body of their own:

text
[[module ListUsers]]
[[module CSS]]
#header { background-image: url(%%avatar%%); }
[[/module]]
[[/module]]

The outer module replaces its variables in the whole body before the inner module runs. If both modules know a variable of the same name, the outer value wins. [[module ListUsers]] offers %%user_displayname%% and %%user_name%% for this case, so it can be used inside [[module ListPages]].

A [[module ListPages]] nested more than 10 levels deep stops with an error.

Switch values ​

Parameters described as a switch accept true, yes, t or 1 for on, and false, no, f or 0 for off, in any letter case. Any other value leaves the default.

Values from the page address ​

Several modules read values from the page address. Everything after the page name is read as key/value pairs:

text
/page-name/key/value/other-key/other-value

Keys are case-insensitive. For example, /forum/c-3/p/2 shows page 2 of forum category 3.

Errors ​

When a module cannot run, the page shows an error block in its place and the rest of the page renders normally.

MessageMeaning
The module name does not existNo module has this name, or the module is not available here
An error occurred while processing the module nameThe module could not run with the values given
Module processing is disabledThe page was opened with /nomodule/true

If a module breaks a page, open the page with /nomodule/true added to its address, for example /main/nomodule/true. No module on the page then runs.

Module index ​

ModuleBodyPurpose
ListPagesYesList pages selected by category, tags, dates, ratings and more
CountPagesYesCount pages selected the same way as ListPages
PagesByTagNoList pages that carry one tag
TagCloudNoShow all tags sized by use
WantedPagesNoList links that point to pages that do not exist
ListUsersYesShow the current reader, or the authors of the page
MembersYesList user accounts, optionally by role
SiteChangesNoRecent edits across the site, with filters
RateNoRating widget for the page
ForumStartNoForum sections and categories
ForumCategoryNoThreads in one forum category
ForumThreadNoPosts in one thread
ForumNewThreadNoForm to start a thread
RecentPostsNoLatest forum posts
FrontForumYesForum threads shown as news items
NewPageNoForm to create a page
SearchNoSite search box with filters
FilesNoTable of the page's attachments
GalleryNoThumbnails of the page's image attachments
CSSYesAdd CSS to the page
PageDescriptionYesSet the description used in link previews
PageImageNoSet the image used in link previews
RedirectNoSend readers to another address
ButtonNoEdit or tag button
InputYesForm controls without a submit action
ApplicationFormNoSubmit a support ticket or membership application
MembershipByPasswordNoJoin a role with a password
CommentsNoLink to the page's comments
TimeYesCurrent date and time in the reader's time zone

Page lists ​

ListPages ​

Selects pages and renders the body once for each page, replacing variables such as %%title%% with that page's values.

text
[[module ListPages category="*" order="updated_at desc" limit="10"]]
* %%title_linked%% (%%rating%%), edited %%updated_at%%
[[/module]]

Without a body, nothing is shown for each page. Pages in categories the reader is not allowed to view are never listed.

Choosing a single page ​

ParameterValuesMeaning
fullnamea full page name, or .Only this page. . is the current page. All other selection parameters are ignored.
name.Only the current page. All other selection parameters are ignored.
range., others.: only the current page; all other selection parameters are ignored. others: the pages selected by the other parameters, without the current page. No other value is recognized.

Selecting pages ​

ParameterValuesDefaultMeaning
category*, ., names.*: all categories. .: the current page's category. Otherwise a list of category names separated by spaces or commas; -name excludes a category, . in the list means the current category. The main category is _default.
pagetypenormal, hidden, *normalnormal: names that do not start with _. hidden: only names that start with _. Any other value: both.
name*, =, prefix*, prefix%, a name*Filters on the page name without its category. =: the same name as the current page. abc* or abc%: names starting with abc. Otherwise an exact name.
tagssee Tags*Filters on tags.
parent-, =, -=, ., a full page namenone-: pages without a parent. =: pages with the same parent as the current page. -=: pages whose parent differs from the current page's. .: children of the current page. A full name: children of that page.
link_toa full page name, or .nonePages that link to the named page. . is the current page.
created_bya user name, wd:name, or .nonePages the user is an author of. wd:name names an imported Wikidot account. . is the reader; a reader who is not signed in gets no pages.
created_atsee DatesnoneFilters on the creation time.
updated_atsee DatesnoneFilters on the time of the last edit.
ratinga number with an optional operator, or =noneFilters on the rating.
votesa whole number with an optional operator, or =noneFilters on the number of votes.
popularitya whole number with an optional operator, or =noneFilters on popularity (percentage of positive votes).
_fielda value with an optional operatornoneFilters on a data form field. See Data form fields.

A value that names nothing (an unknown parent page, an unknown user, a date or number that cannot be read) makes the list empty.

For rating, votes and popularity, the operators are =, <>, >, >=, < and <=, written before the value: rating=">=10". A value without an operator means =. The value = alone means "equal to the current page's value". Ratings are the sum of votes on sites or categories using Upvote/downvote, and the average on those using Stars. Rating filters and rating order use the rating system of the first category named in category, or of _default when none is named.

Tags ​

ValueMeaning
*No tag filter (default)
-Pages without any tags
=Pages that have every tag of the current page, and possibly more
==Pages that have exactly the tags of the current page, no more and no fewer. On a page without tags: pages without any tags
a listTags separated by spaces or commas, see below

In a list:

  • +tag: the page must have this tag.
  • -tag: the page must not have this tag.
  • tag: the page must have at least one of the tags written this way.
  • Write category:tag for a tag in a tag category.

Tag names are matched in lowercase. If a +tag does not exist on the site, or none of the plain tags exist, the list is empty. A -tag that does not exist is ignored.

text
[[module ListPages category="*" tags="+euclid -archived"]]

Dates ​

created_at and updated_at take a year, a month or a day, with an optional operator in front:

text
2021        2021-02        2021-02-09        >=2021-02        <>2021

Dates are read in the site time zone (see Site administration). A year, month or day covers the whole period, from 00:00 on its first day until 00:00 on the day after it ends. The operators use the period as follows:

ValueSelects pages whose time is
2021 or =2021within 2021: from 2021-01-01 00:00, before 2022-01-01 00:00
2021-02within February 2021: from 2021-02-01 00:00, before 2021-03-01 00:00
2021-02-09within 9 February 2021: from 2021-02-09 00:00, before 2021-02-10 00:00
<>2021outside 2021: before 2021-01-01 00:00, or from 2022-01-01 00:00
>2021after 2021: from 2022-01-01 00:00
>=2021from the start of 2021: from 2021-01-01 00:00
<2021before 2021: before 2021-01-01 00:00
<=2021up to the end of 2021: before 2022-01-01 00:00
=within the day of the current page

Each parameter takes one condition. created_at=">=2021-02-08" selects pages created on or after 8 February 2021, and updated_at="<2021-03" selects pages last edited before March 2021.

The year must be between 1 and 9999. A month or day outside its range is moved to the nearest valid value, so 2021-13-99 is read as 2021-12-31. Any other text makes the list empty.

Order ​

order takes a field name, optionally followed by a space and desc for descending order. Write both words in lowercase. The default is created_at desc.

FieldOrders by
created_atCreation time
updated_atTime of the last edit
created_byAuthor account name. A page with several authors appears once for each author.
namePage name without category
fullnameFull page name
titleTitle
ratingRating
votesNumber of votes
popularityPopularity
sizeLength of the current source
revisionsNumber of history entries
commentsNumber of posts in the page's comments
randomRandom order; the direction is ignored
_fieldA data form field, compared as text

Any other field lists the newest pages first. reverse="true" with the default order shows the oldest pages first only when all selected pages fit on one list page, because it reverses the current list page alone.

Limits and pagination ​

ParameterValuesDefaultMeaning
offsetwhole number0Skip this many pages at the start.
limitwhole numbernoneShow at most this many pages in total.
perPagewhole number20Pages per list page, at most 250. 0 or less shows no pages.
reverseswitchfalseReverse the order of the pages on the current list page.

When the selected pages do not fit on one list page, a pager appears below the list. Its links are ordinary addresses of the form /page-name/p/2, so a list page can be linked to directly. All lists on the same page share the p value.

Formatting ​

ParameterValuesDefaultMeaning
prependLinewikitextnoneRendered once before the pages. Variables are not replaced.
appendLinewikitextnoneRendered once after the pages. Variables are not replaced.
separateswitchtrueOn: each page's body, prependLine and appendLine are rendered separately, and [[iftags]], [[ifcategory]] and images in the body refer to the listed page. Off: everything is joined into one piece of wikitext first, which is required for building a table across rows; [[iftags]] and [[ifcategory]] then refer to the page the list is on.
wrapperswitchtrueOn: the list is wrapped in a div with the class list-pages-box and gets a pager. Off: no wrapper and no pager; only the first list page (or the one named by p in the address) is shown.
tagTargetpage namesystem:page-tagsPage that %%tags_linked%% links point to: /<tagTarget>/tag/<tag>.

A table built from a list:

text
[[module ListPages category="*" tags="+featured" order="rating desc" separate="false" prependLine="||~ Page ||~ Rating ||~ Created ||"]]
|| %%title_linked%% || %%rating%% || %%created_at|%Y-%m-%d%% ||
[[/module]]

Instead of prependLine and appendLine, the body can be split into [[head]], [[body]] and [[foot]] sections. They must appear in this order, and [[body]] must be present when the others are used. Line breaks right after an opening tag and right before a closing tag are removed:

text
[[module ListPages category="news" perPage="5"]]
[[head]]
++ Latest news
[[/head]]
[[body]]
* %%title_linked%%
[[/body]]
[[foot]]
[[[news:archive|All news]]]
[[/foot]]
[[/module]]

Values from the address ​

Any parameter value can be taken from the page address with @URL|default. The module uses the address value with the same key as the parameter, or default when the address has none:

text
[[module ListPages category="@URL|sandbox"]]
* %%title_linked%%
[[/module]]

Opened as /page-name/category/drafts, this lists pages in drafts; opened as /page-name, it lists pages in sandbox. This works in ListPages and CountPages.

Variables ​

Variables are written as %%name%% and are case-sensitive: %%Title%% is not replaced. A variable that has no value for a page is left unchanged unless stated otherwise. The same variables are available in category templates (category:_template).

Page:

VariableValue
%%name%%Page name without category
%%category%%Category (_default for the main category)
%%fullname%%Full page name; no category prefix for the main category
%%title%%Title
%%title_linked%%, %%linked_title%%Link to the page showing its title
%%link%%/ followed by the page title. It matches the page address only when the title equals the page name.
%%content%%The page's current source
%%content{n}%%Section n of the source, counting from 1. Sections are separated by a line of four or more = characters. A section that does not exist gives an empty value.
%%size%%Number of characters in the current source
%%revisions%%Number of history entries
%%children%%Number of child pages
%%index%%Position in the list, counting from 1 and continuing across list pages
%%total%%Number of pages selected

Parent page (left unchanged when the page has no parent):

VariableValue
%%parent_name%%, %%parent_category%%, %%parent_fullname%%, %%parent_title%%The parent's name, category, full name and title
%%parent_title_linked%%, %%parent_linked_title%%Link to the parent showing its title

Dates (shown in the reader's time zone):

VariableValue
%%created_at%%Creation time
%%updated_at%%Time of the last edit
%%created_at|format%%, %%updated_at|format%%The same, with a [[date]] format, for example %%created_at|%Y-%m-%d%%

People:

VariableValue
%%created_by%%Authors' display names, separated by spaces. Imported Wikidot accounts get a wd: prefix.
%%created_by_unix%%Authors' account names
%%created_by_id%%Authors' user IDs
%%created_by_linked%%Authors as user links with avatars
%%created_by_linked_plain%%Authors as user links without avatars
%%authors_count%%Number of authors
%%updated_by%%, %%updated_by_unix%%, %%updated_by_id%%, %%updated_by_linked%%, %%updated_by_linked_plain%%The same for the last editor. Without an editor, the text and link forms show the system account label System.

Ratings:

VariableValue
%%rating%%Upvote/downvote: the sum with a sign, such as +12. Stars: the average with one decimal, or — without votes. Rating turned off: 0.
%%rating_votes%%Number of votes
%%rating_percent%%Stars only: the average as a percentage of 5. Otherwise 0.
%%popularity%%Percentage of positive votes (up votes, or star votes of 3.0 and above). 0 when rating is turned off.
%%current_user_voted%%True or False

Tags. Tags are lowercase and sorted. Tags whose full name starts with _ are hidden tags.

VariableValue
%%tags%%Visible tags, separated by spaces
%%_tags%%Hidden tags only
%%alltags%%All tags
%%tags_linked%%, %%_tags_linked%%, %%alltags_linked%%The same as links, separated by commas. Links go to /system:page-tags/tag/<tag>, or to the page set with tagTarget.
%%tags_linked|prefix%% (also with _tags and alltags)Links go to prefix followed by the tag. A prefix that does not start with /, http:// or https:// gets a / in front.

Comments:

VariableValue
%%comments%%Number of posts in the page's comments
%%commented_at%%Time of the last post; empty when there are no posts
%%commented_by%%, %%commented_by_unix%%, %%commented_by_id%%, %%commented_by_linked%%Author of the last post; empty when there are no posts

Site:

VariableValue
%%site_name%%Site identifier
%%site_title%%Site title
%%site_domain%%Site domain

%%preview%%, %%summary%% and %%first_paragraph%% are not available.

When a list shows %%content%%, modules in the listed pages run as well. A [[module CSS]] in a listed page styles the page the list is on, and a [[module Redirect]] in a listed page redirects it.

In a category template, the template's own variables are replaced before any module in it runs. A [[module ListPages]] body written in a template therefore receives the values of the page being displayed, not of the listed pages.

Data form fields ​

A category whose _template page contains a [[form]] block is a data form category. The block defines the fields in YAML, and the source of each page in the category holds the values as YAML field: value lines. The [[form]] block itself is not displayed.

text
[[form]]
fields:
  status:
    type: select
    label: Status
    values:
      open: Open
      done: Done
  priority:
    label: Priority
[[/form]]

A page in that category:

text
status: done
priority: 02

Field properties are type, label, hint, default, value and values (the options of a select). The types are text (the default), wiki, select, checkbox, hidden and static; hidden and static fields always have the value from the definition. Fields are edited by editing the page source. For such pages:

VariableValue
%%form_data{field}%%The field value prepared for display. Text entered by page authors is shown literally; wiki and static fields and the labels of select options are rendered as wikitext.
%%form_raw{field}%%The stored value, unchanged
%%form_label{field}%%The field's label
%%form_hint{field}%%The field's hint

ListPages can filter and order by fields with an underscore in front of the field name:

text
[[module ListPages category="projects" _status="=done" order="_priority desc"]]
* %%title_linked%%: %%form_data{status}%%
[[/module]]
  • The operators are =, <>, >, >=, < and <=. = ignores letter case; the others compare text character by character, so numbers compare correctly only when they have the same number of digits (write 01, 02, … 10).
  • A page in a category without a form never matches a field condition.
  • Filtering by fields reads every page that matches the other parameters, so it is slower on large categories.

Older parameter names ​

These old parameter names are accepted:

WrittenRead as
datecreated_at
categoriescategory
tagtags
order="dateCreatedAsc", dateCreatedDesccreated_at, created_at desc
order="dateEditedAsc", dateEditedDescupdated_at, updated_at desc
order="titleAsc", titleDesctitle, title desc
order="ratingAsc", ratingDescrating, rating desc
order="pageLengthAsc", pageLengthDescsize, size desc

skipCurrent="true" leaves the current page out, like range="others", when range is not given.

CountPages ​

Counts the pages selected by the same parameters as ListPages and renders the body once. perPage has no effect; offset and limit do. @URL|default values work.

VariableValue
%%total%%, %%count%%Number of pages (not case-sensitive)
text
[[module CountPages category="scp" tags="+euclid"]]
There are %%total%% Euclid pages.
[[/module]]

PagesByTag ​

Lists the pages that carry one tag, sorted by title.

ParameterValuesDefaultMeaning
taga tag name, or category:tagnoneThe tag. A tag value in the page address (/page-name/tag/euclid) takes precedence.

Without a tag, or when the tag category does not exist, the module shows nothing. Tag names are not case-sensitive. Pages in categories the reader cannot view are left out.

text
[[module PagesByTag]]

Placed on system:page-tags, this lists the pages for the tag in the address, which is where TagCloud links point by default.

TagCloud ​

Shows every tag on the site, with more-used tags larger and darker. Tags are sorted by name without their category. Tags whose name starts with _ are never shown.

ParameterValuesDefaultMeaning
limitwhole number, 0 or moreallInclude only this many of the most-used tags. A value that cannot be read shows an error.
minFontSize, maxFontSizesize with a unit, such as 80% or 12px100%, 300%Font sizes for the least- and most-used tags. Give both, with the same unit; if only one is given, both defaults are used.
minColor, maxColor#rgb, #rrggbb, rgb(r,g,b) or r,g,b128,128,192, 64,64,128Colors for the least- and most-used tags. Give both; if only one is given, both defaults are used.
targetpage namesystem:page-tagsTag links go to /<target>/tag/<tag>.
categoriesyesnoneGroup tags by tag category in collapsible blocks, ordered by the tag category's Priority.

Sizes are read as a whole number followed by a unit: 1.5em is read as 1 with the unit .5em. Use whole numbers, such as 150%. A size that does not start with a number, two sizes with different units, or a color that cannot be read shows an error.

text
[[module TagCloud limit="50" minFontSize="80%" maxFontSize="200%" categories="yes"]]

WantedPages ​

Lists links that point to pages that do not exist, in a table with the pages that contain them.

ParameterValuesDefaultMeaning
category_fromas category in ListPages.Categories of the pages that contain the links.
category_toas category in ListPages*Categories of the missing pages.
perPagewhole number20Rows per list page, at most 250.

The source pages can be narrowed further with the other ListPages selection parameters, such as tags or parent. limit and offset are ignored.

text
[[module WantedPages category_from="*" category_to="-fragment"]]

Users ​

ListUsers ​

Shows information about the reader, or about the authors of the current page.

ParameterValuesDefaultMeaning
alwaysswitchfalseRender the body for readers who are not signed in. Without it, the module shows nothing to them.
anonnametext"Anonymous" in square bracketsName used for a reader who is not signed in.
authorsswitchfalseRender the body once for each author of the current page instead.

Variables for the reader (not case-sensitive):

VariableSigned inNot signed in
%%number%%User ID-1
%%title%%, %%user_displayname%%Display name, or account name when there is noneanonname
%%name%%, %%user_name%%Account nameanonname
%%avatar%%Avatar addressDefault avatar address
%%is_authenticated%%truefalse

Variables with authors="yes":

VariableValue
%%author%%Author's display name; imported Wikidot accounts get a wd: prefix
%%author_linked%%Author as a user link
text
[[module ListUsers always="yes"]]
[[if %%is_authenticated%%]]
Signed in as %%title%%.
[[else]]
Not signed in.
[[/if]]
[[/module]]
text
[[module ListUsers authors="yes"]]
%%author_linked%%
[[/module]]

Members ​

Lists user accounts in order of user ID, one body per account. Deactivated accounts are included.

ParameterValuesDefaultMeaning
rolerole Identifier or role IDall accountsOnly accounts that have this role. An unknown role shows an error.
perPagewhole number100Accounts per list page, at most 500.
limitwhole number100Used when perPage is not given.

Variables (not case-sensitive):

VariableValue
%%members%%, %%member%%User link with avatar
%%time%%Registration time
%%number%%User ID
%%name%%Account name
%%title%%Display name, or account name when there is none
%%index%%Position, counting from 1 and continuing across list pages
%%total%%Number of accounts listed

Paging uses p in the address.

text
[[module Members role="staff" perPage="20"]]
|| %%index%% || %%members%% || %%time%% ||
[[/module]]

Site activity ​

SiteChanges ​

Shows recent changes across the site, newest first. It has no parameters; the filters are set with the form above the list or in the page address.

Address keys:

KeyValuesMeaning
categorycategory name, or *Category filter
usernameaccount name, or ~partUser filter. Changes made by the system are included when the name is system, or with ~ when the text is part of the word system.
perpagewhole number greater than 0Items per list page, default 20
pwhole numberList page
a change typetrueShow this type

category, username, perpage and the change type keys must have a value. A key without one, or a perpage that is not a positive number, shows an error.

Change types and flags:

KeyFlagLabel
sourceSPage content changed
titleTTitle changed
nameRPage renamed or deleted
tagsATags changed
newNNew page created
parentMParent page changed
file_added, file_deleted, file_renamedFFile added / File deleted / File renamed
votes_deletedVVotes changed
authorshipCAuthors changed
wikidotWEdit imported from Wikidot

A revert is flagged with the types it undid and is included when any of those types is selected. The key revert selects reverts only.

text
[[module SiteChanges]]

Example address: /system:recent-changes/source/true/username/~ali/perpage/50.

Ratings ​

Rate ​

Shows the rating widget for the current page. The style follows the Rating system set for the site or the page's category (see Site administration); when it is Off, nothing is shown. Voting requires the permission to rate pages.

text
[[module Rate]]
ParameterDefaultDescription
favouritenoWith yes, a favourite button and the number of favourites follow the rating widget. Not shown either when the rating system is Off.
text
[[module Rate favourite="yes"]]

Readers can also rate with the Rate button below the page, and favourite it with the Favourite button, whether or not the page contains this module (see Features).

Forum ​

The forum is made of system pages that contain the forum modules. pwikit seed writes these pages for a new site (see Command line). Forum addresses are rewritten to these pages:

AddressPageModule
/forum/startforum:startForumStart
/forum/s-<id>forum:start/s/<id>ForumStart
/forum/c-<id>forum:category/c/<id>ForumCategory
/forum/t-<id>forum:thread/t/<id>ForumThread
/forum:new-thread/c/<id>forum:new-threadForumNewThread
/forum:recent-postsforum:recent-postsRecentPosts

A name after the ID, as in /forum/t-12/my-thread, is for readability only. Put other keys directly after the ID: /forum/c-3/p/2. The forum modules also set the page title. Using the forum is described in Features.

ForumStart ​

Lists forum sections and their categories. Sections without any visible category are not shown. It has no parameters.

Address keyMeaning
sShow only this section. An unknown section gives a 404 status.
hiddenshow also lists hidden sections

ForumCategory ​

Lists the threads of one forum category, pinned threads first. It has no parameters.

Address keyMeaning
cCategory ID. Unknown or missing: 404 status.
sortstart orders by thread creation time; otherwise by last reply time
pList page

Viewing requires the permission to view the forum category. The category used for page comments shows no New thread link.

ForumThread ​

Shows the posts of one thread, with replies under the post they answer. Replying, editing and deleting depend on permissions.

ParameterValuesDefaultMeaning
contentonlyyesnoneShow only the posts: no breadcrumbs, description, thread options or reply form.
Address keyMeaning
tThread ID. Unknown or missing: 404 status.
pList page
postPost ID; opens the list page that contains this post

ForumNewThread ​

Shows the form for starting a thread in a forum category. It has no parameters.

Address keyMeaning
cCategory ID. Unknown or missing: 404 status.

RecentPosts ​

Lists the newest forum posts. A drop-down above the list limits it to one forum category. It has no parameters.

Address keyMeaning
cCategory ID. A value that is not a number empties the drop-down and the list.
pList page

When the site has a category for page comments, a list not limited to one forum category also includes page comments.

FrontForum ​

Shows threads from forum categories as news items, newest first, one body per thread. The first post of each thread supplies the content. Pinned threads keep their place in date order. There is no pager.

ParameterValuesDefaultMeaning
categorycategory IDs separated by ;requiredCategories to take threads from. IDs that do not exist are skipped. Without any ID, the module shows an error.
limitwhole number20Number of threads. 0 shows none.
offsetwhole number0Skip this many threads.

Category IDs appear in forum addresses: /forum/c-3/news is category 3. feed, feedTitle, fixRelativeLinks, separate and order are not supported.

Variables (case-sensitive):

VariableValue
%%title%%Thread title
%%linked_title%%, %%title_linked%%Link to the thread
%%link%%Thread address
%%author%%Link to the thread's author
%%date%%Thread creation time
%%date|format%%The same with a [[date]] format
%%comments%%Number of replies (posts minus the first)
%%category%%Link to the forum category
%%content%%, %%text%%, %%long%%, %%body%%Source of the first post
%%description%%, %%short%%, %%summary%%The first 200 characters of the first post as plain text

Without a body, the default format of the site language is used. In Chinese it is:

text
+ %%linked_title%%

%%author%% 发表于 %%date|%O前(%Y年%b%e日 %H:%M)%%

%%content%%

%%comments%% 条回复 | 分类:%%category%%

Readers without the permission to view forum categories see nothing.

text
[[module FrontForum category="3;7" limit="5"]]
++ %%linked_title%%
%%date|%Y-%m-%d%% · %%author%%

%%summary%%
[[/module]]

ForumPost and ForumNewPost ​

These are used by the thread page for loading, editing, replying to and previewing posts. They cannot be placed on a page; writing them shows a message that the module does not exist.

Creating pages and searching ​

NewPage ​

Shows a text box and a button for creating a page.

ParameterValuesDefaultMeaning
categorycategory namenoneThe new page is created in this category: the name entered becomes category:name.
exampletextnonePlaceholder text shown in the empty box.
submittext"Create page"Button label. An empty value gives an empty button.

On submit, the name is converted to a page name the same way a link is. If the name can be used and the page does not exist yet, the browser opens the editor for the new page.

text
[[module NewPage category="draft" example="my-idea" submit="Start a draft"]]

Shows the site search, with author, tag, category and date range filters. Results are listed newest first.

A page matches when its text contains every word entered. The author filter accepts an account name, an imported Wikidot account name or a display name. In the tag field, -tag excludes a tag. The date range compares creation dates as whole days in UTC, not in the site time zone. Pages, categories and tags excluded from search in the admin panel are never shown.

ParameterValuesDefaultMeaning
placeholdertextA prompt to search page titles or contentPlaceholder in the search box
qtextnoneInitial search words
tagstagsnoneInitial value of the tag filter
categorycategory namenoneInitial value of the category filter
Address keyMeaning
qInitial search words; takes precedence over the q parameter
authorInitial author filter
datefrom, datetoInitial date range, as YYYY-MM-DD
text
[[module Search]]

Example address: /search:site/q/archive/author/alice.

Attachments ​

Files ​

Shows a table of the current page's attachments with their MIME types and sizes, and a link for managing attachments. It has no parameters.

text
[[module Files]]

Shows thumbnails of the current page's image attachments.

ParameterValuesDefaultMeaning
sizesquare, thumbnail, small, mediummediumsquare: 75 × 75, cropped. thumbnail: 100 on the longer side. small: 240. medium: 500. Any other value shows an error.

[[gallery]] is a shorthand for this module:

text
[[gallery size="small"]]

The shorthand is replaced everywhere in the page source, including inside [[code]] blocks.

Page settings and styling ​

CSS ​

Adds the body as CSS to the page. The CSS is always placed in the page head, wherever the module appears, so its position on the page does not affect which rules win. It has no parameters; a head parameter is accepted and ignored.

text
[[module CSS]]
#page-title { color: purple; }
[[/module]]

A [[module CSS]] in an included page, or in a page shown with %%content%% in a list, also applies to the page that shows it.

PageDescription ​

Sets the page description used in link previews (the og:description tag) to the body text. Without this module, the start of the page text is used. It shows nothing on the page.

text
[[module PageDescription]]
A short summary of this page for link previews.
[[/module]]

PageImage ​

Sets the image used in link previews (the og:image tag). It shows nothing on the page.

ParameterValuesDefaultMeaning
srcan address, or page-name/filenoneA full address (containing //) is used as it is. page-name/file.png points to an attachment of that page on the media domain. A bare file name without / is used as it is and is not resolved to an attachment of the current page.
text
[[module PageImage src="main/cover.png"]]

Redirect ​

Sends readers to another address with an HTTP redirect when they open the page.

ParameterValuesDefaultMeaning
destinationan addressnoneWhere to send readers. Addresses using javascript: or data: are refused with an error.
noredirectswitchfalseTurn the redirect off.

To view or edit a page that redirects, open it with /noredirect/true added to its address.

text
[[module Redirect destination="/scp-1730"]]

A Redirect in an included page, or in a page shown with %%content%% in a list, redirects the page that shows it.

Buttons and forms ​

Button ​

Shows a button that acts on the current page. Several buttons can stand side by side in a line of text.

FormAction
[[button edit]]Opens the editor. Shown for a page that does not exist (through a _404 template page), opens the editor for creating that page.
[[button set-tags +tag -tag]]Adds and removes tags, then reloads the page. A tag written without + or - is added.
ParameterValuesDefaultMeaning
texttextthe button typeButton label. Spaces at the start and end are removed.
text
[[button edit text="Edit this page"]] [[button set-tags +reviewed -needs-review text="Mark reviewed"]]

Other types show an error. Changing tags needs the permission to tag pages; otherwise an error message appears. The long form [[module Button type="set-tags" tags="+a -b" text="…"]] is equivalent. The [[button ...]] shorthand is replaced everywhere in the page source, including inside [[code]] blocks.

Every button has the class wiki-standalone-button and a data-button-type attribute with its type, which themes can use for styling.

Input ​

Shows form controls that are not sent anywhere. It is meant for controls that drive CSS, such as a dark-mode checkbox styled with :has(input.checkbox:checked). The output uses the class mailform-box so that themes written for Wikidot's MailForm keep working, but [[module MailForm]] itself is not available.

The body defines fields. A line starting with # starts a field and names it; lines starting with * set its properties as property: value.

PropertyValuesDefaultMeaning
titletextthe field nameLabel
typetext, textarea, select, checkboxtextControl type
sizewhole number30Width of a text box
defaulttextnoneInitial value. For a checkbox, 1, yes, true or checked ticks it. For a select, the option key.
hinttextnoneHelp text under the control
optionskey: labelnoneOne option of a select; repeat for each option

[[input]] ... [[/input]] is a shorthand for this module:

text
[[div class="dark-mode-button"]]
[[input]]
# dark
* title: Dark mode
* type: checkbox
[[/input]]
[[/div]]

A body without fields shows an error. The shorthand is replaced everywhere in the page source, including inside [[code]] blocks.

ApplicationForm ​

Shows a form for sending a support ticket or a membership application to the site staff, who handle them under Support tickets or Membership applications in the admin panel (see Site administration).

ParameterValuesDefaultMeaning
type or kindmembershipapply, anything elseticketmembershipapply sends a membership application; any other value sends a ticket.
title or subjectswitch or textsubject field shownA switch turns the subject field on or off. Any other text hides the field and uses the text as the subject.

The body is required and may be up to 20,000 characters; the subject up to 200. Submitting requires signing in.

A subject of the literal words yes or no cannot be set, because those words act as the switch.

text
[[module ApplicationForm type="membershipapply" title="Membership application"]]

MembershipByPassword ​

Shows a password field. A signed-in reader who enters the correct password receives a role. The password and the role are set under Membership by password in the site settings (see Site administration). When joining with a password is turned off, the module shows nothing. Entering the password requires signing in.

ParameterValuesDefaultMeaning
label or texttext"Enter password"Label of the password field
text
[[module MembershipByPassword label="Invitation password"]]

Comments ​

Places a link to the current page's comments. It has no parameters.

text
[[module Comments]]

Time ​

Time ​

Replaces date and time variables in the body with the current time, shown in the reader's time zone. Values are zero-padded.

VariableValue
%%currentyear%%Year
%%currentmonth%%Month, 01–12
%%currentday%%Day, 01–31
%%currenthour%%Hour, 00–23
%%currentminute%%Minute
%%currentsecond%%Second

Variables are not case-sensitive, and the spelling curent (one r) is also accepted.

text
[[module Time]]
© 2019–%%currentyear%% Example Wiki
[[/module]]

This is the only module that works in the site footer license text.