Module:If preview/doc

This is the documentation page for Module:If preview

Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.

This module implements {{if preview}} and {{preview warning}}. It helps templates/modules determine if they are being previewed.

Prefer implementing the template versions in other templates.

In a module to use the main(), you need to pass a frame table with an args table.

For the preview warning, use _warning().