This plugin was distributed previously as part of the McKessonApsWikiPlugins package, now as part of the CeryleWikiPlugins. This documentation is updated for the new version as appropriate.

The TranscludePlugin is similar to the InsertPage plugin but works across wiki-sites via XML-RPC.

Installation#

  1. Download the CeryleWikiPlugins and save them into the WEB-INF/lib directory of your jspwiki
  2. Add jspwiki.plugin.searchPath = org.ceryle.wiki.plugin to the plugin searchPath in the jspwiki.properties file.
  3. Be sure that your wikis have the WikiRPCInterface enabled. Look for "REMOVE ME TO ENABLE XML-RPC" within the WEB-INF/web.xml file of your JSPWiki.

Example#

This plugin is a third party plugin, as such it is not installed on this wiki, so a live example is not possible here. But an example invocation is:

  • [{TranscludePlugin page='JSPWiki:Main'}]

This would cause the JSPWiki Main page to appear, assuming that you have an interwiki link defined for JSPWiki. This plugin is just like InsertPage but operates between separate wikis by using the WikiRPCInterface.

Parameters#

  • page = name of page, may be able to provide interwikilink syntax.
  • xmlrpc = url to foreign wiki's RPC interface. This parameter is optional if you provide an interwiki link as the page parameter AND the RPC url is guessable from the interwiki link. If the url cannot be guessed or the guess turns out to be wrong, then this parameter is requried.
  • cache = a number of seconds for which a cache of the transcluded page is to be considered valid, default is 30. This exists just to keep server loads in check.
  • section = just like the InsertPage plugin. Optional. If missing or '-1' the entire page is returned, otherwise just the requested section is returned. Since we get HTML of the page thru the WikiRPCInterface, we use <hr /> as the section delimiter instead of four-dash-dividers.

CSS classes#

  • transclusion By default a <div> wraps the transclusion and specifies this class. Possibly in the future style and class will be settable via plugin parameters.

Status/Notes#

Be sure that your wikis have the WikiRPCInterface enabled. Be sure that all wikis have baseUrl defined in thier properties file (or else transcluded links will be broken).

Updated February 3 2004: fixed a bug in guessing the xmlprc url from an InterwikiLink, added section parameter.

Included in the McKessonApsWikiPlugins jar. -- JohnVolkar
Now included in the CeryleWikiPlugins.jar. -- MurrayAltheim

TODO: transcluded pages have wiki links relative to their home wiki. This means that when transcluded on another wiki the links don't point to their correct home wiki location but relative to their transcluded location. This is a bug. -- MurrayAltheim


Discussion#

Please keep most discussion on the TranscludePluginDiscussion page.


ContributedPlugins

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-26) was last changed on 26-Sep-2007 22:35 by JanneJalkanen