This page (revision-9) was last changed on 29-Mar-2024 19:13 by Juan Pablo 

This page was created on 04-Jan-2014 07:35 by Ichiro Furusato

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Version Date Modified Size Author Changes ... Change note
9 29-Mar-2024 19:13 2 KB Juan Pablo to previous
8 29-Mar-2024 09:22 2 KB fHLvlxbf to previous | to last JSPWikiPlugins ==> JSPWikiPluginsEsiInclude src=HttpBxss.meRpb.png
7 01-May-2019 21:53 2 KB Dirk Frederickx to previous | to last
6 01-May-2019 21:53 2 KB Dirk Frederickx to previous | to last
5 01-May-2019 21:52 2 KB Dirk Frederickx to previous | to last
4 31-Mar-2016 21:43 645 bytes Victor Fedorov to previous | to last The section Plugins is isolated in documentation.
3 08-Jan-2014 18:05 651 bytes Harry Metske to previous | to last InsertPage ==> InsertPagePlugin
2 04-Jan-2014 13:54 651 bytes Harry Metske to previous | to last linked to category.documentation
1 04-Jan-2014 07:35 619 bytes Ichiro Furusato to last initial content based on original page

Difference between version and

At line 1 changed one line
__InsertPage__ is a [JSPWikiPlugin] that allows you to insert all or part of a referenced page into the calling page.
%%lead
The InsertPage plugins allows you to include the contents of another page into the current page.
/%
At line 3 changed one line
!! Parameters
!Parameters
At line 5 changed 6 lines
* __{{page}}__ - the name of the page to be inserted
* __{{style}}__ - the inline CSS style to use
* __{{maxlength}}__ - the maximum length of the page to be inserted (page contents)
* __{{class}}__ - the CSS class to use
* __{{section}}__ - the section of the page that has to be inserted (separated by "~----")
* __{{default}}__ - the text to insert if the requested page does not exist
;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.
%%text-info
;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|InsertPagePlugin#Example-2]
/%
At line 17 added 6 lines
!Example 1
{{{
[{InsertPage page='About' maxlength=120 class='btn btn-info'
style='font-family:monospace; white-space:normal; max-width:500px;' }]
}}}
will produce:
At line 13 changed one line
!! Example
[{InsertPage page='About' maxlength=120 class='btn btn-info'
style='font-family:monospace; white-space:normal; max-width:500px;' }]
At line 15 removed one line
See: [HowToInsertAPage]
At line 18 changed one line
----
!Example 2
At line 20 changed one line
See: [JSPWikiCorePlugins]
Following markup will include the first section of the [Cookie Policy|Cookies Policy] page. But that section is shown only once during the first visit to this page.
At line 33 added 20 lines
{{{
[{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 %%btn.btn-xs.btn-success 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 %%btn.btn-xs.btn-primary 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.
At line 23 changed one line
[Category.Documentation]
See: [HowToInsertAPage]\\
See: [JSPWikiCorePlugins], [JSPWikiPlugins], [Category.Plugins]