%%(font-size:75%;color:gray;padding-bottom:1em) 
This plugin was distributed previously as part of the McKessonApsWikiPlugins package, then part of the CeryleWikiPlugins, now as part of the [NeWikiPlugins]. This documentation is updated for the new version as appropriate.
%%

The __TranscludePlugin__ plugin permits the transclusions of content from other pages based on a query. This is similar to the [InsertPage plugin|InsertPagePlugin] but works across wiki-sites via XML-RPC. It has a {{{[{Transclude}]}}} shortcut.


!! Installation

# Download the NeocortextPlugins and save the jar file into the WEB-INF/lib directory of your jspwiki
# Add __{{jspwiki.plugin.searchPath = net.neocortext.wiki.plugin}}__ to the plugin searchPath in the __{{jspwiki.properties}}__ file.
# 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

See the bottom of this page.


!! 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 their 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 known bug. 

----

[{Tag WikiPlugin NeocortextPlugin}]

----

!! Example

An example invocation is:

* [[{Transclude 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. Here we go:

[{Transclude page='JSPWiki:Main'}]


----

[{Tag Ceryle}]