[[PageOutline(2-5,Contents,pullout)]] = Wiki Include Plugin = == Description == When the [http://trac.edgewall.org/wiki/MacroBazaar#WikiInclude WikiInclude] macro is used, there is an error being displayed occasionally. Please see MacroMigrationTutorial for the reasons. This plug-in offers the same function, without issuing an error. == Bugs/Feature Requests == Existing bugs and feature requests for WikiIncludePlugin are [report:9?COMPONENT=WikiIncludePlugin here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=WikiIncludePlugin&owner=yu-ji new ticket]. == Download == [download:wikiincludeplugin WikiIncludePlugin] == Source == You can check out WikiIncludePlugin from [http://trac-hacks.org/svn/wikiincludeplugin here] using Subversion, or [source:wikiincludeplugin browse the source] with Trac. == Installation == * Build the ''egg'' file following the plugin packaging [http://projects.edgewall.com/trac/wiki/TracDev/PluginDevelopment#Packaginganddeployingplugins instructions] * Copy the `dist/WikiIncludePlugin-0.y.z-py2.3.egg` file in your ''plugins'' project directory. * Requires setup in trac.ini. {{{ #!ini [components] wikiinclude.* = enabled }}} * ''If you are using the [http://projects.edgewall.com/trac/wiki/MacroBazaar#WikiInclude WikiInclude] macro, you need to remove wiki-macros/WikiInclude.py'' == Example == {{{ [[WikiInclude(Foo)]] [[WikiInclude(Foo|Argument1|Argument2..|ArgumentN)]] }}} Version 0.2 (see attachment) with possibility to include specific page version: {{{ [[WikiInclude(Specification?version=7)]] }}} == Recent Changes == [[ChangeLog(wikiincludeplugin, 3)]] == Author/Contributors == '''Author:''' [wiki:yu-ji] [[br]] '''Maintainer:''' [wiki:yu-ji] [[br]] '''Contributors:''' [wiki:bubacoo] == Wiki Variable == Contribution done by [[wiki:mdelorme]] I update the script to be able to use Wiki Variables (think report variables) {{{ for arg in args: text = text.replace('{{%d}}' % (i+1), args[i]) i += 1 for arg in req.args: text = text.replace('{{%s}}' % arg, req.args[arg]) }}} You use is it like this.[[BR]] You call your page my_trac.com/wiki/my_page?FOO=1234[[BR]] then in ''my_page'' {{{ Lorem impsum ... [[WikiInclude(Foo)]] .... }}} and then in ''Foo'' you could use FOO like this {{{ bla bla bla {{FOO}} bla bla {{1}} blabla bla blabla bla bla }}}