The InsertPage plugins allows you to include the contents of another page into the current page.

Parameters#

page
WikiName. The WikiName of the page you want to insert.
class
string. The CSS class to use.
style
CSS definition. A style you want to use to include the page with.
maxlength
integer. If the page exceeds this length in characters, it will be truncated and a text "More..." linking to the page will be appended.
section
integer. Inserts only a part of a page. The sections are separated with ---- and are counted starting from one (1), that is, the first section on a page is number 1.
default
string. If the page does not exist, will insert this default. If not defined, inserts a suggestion to create the page.
show (since v2.11.0.M4)
string. Default value is always. If the parameter is set to once the contents is only included once. A cookie will be set in the browser to remember the status.
See Example-2

Example 1#

[{InsertPage page='About' maxlength=120 class='btn btn-info' 
             style='font-family:monospace; white-space:normal; max-width:500px;' }]
will produce:

There is no page called 'About'. Would you like to create it?

Example 2#

Following markup will include the first section of the Cookie Policy page. But that section is shown only once during the first visit to this page.

[{InsertPage page='Cookie Policy' section='1' }]

Note when adding this to the LeftMenu or TitleBox page, its content will be shown on any page you visit of the site. You can use this to display a generic warning or notification to all users visiting your site for the first time.

By default the inserted content will be presented as a modal dialog overlayed on top of the page, hiding most of the page's content. You can specify other classes (eg. class='info' to show the content of inserted section inline; keeping the information of the page fully readable.

[{InsertPage page='Cookie Policy' section='1' class='info' }]

JSPWiki will automatically add an OK (btn-success) button to the included content, unless there is already one in the inserted section.

  • When a user clicks that OK button, JSPWiki will set a once page cookie in the browser. The next time the users visits this page, the included content or modal dialog will not anymore be shown. Until the cookie is expired or deleted.
  • It is common to also include a Redirect to... link so the user is redirected to the inserted page itself.

In the UserPreferences the user can view and remove any of the page cookies, if needed.


See: HowToInsertAPage
See: JSPWikiCorePlugins, JSPWikiPlugins, Category.Plugins