Edgewall Software

Changes between Version 35 and Version 36 of TracDev/Proposals/AdvancedWikiFormatting


Ignore:
Timestamp:
Jul 14, 2010, 11:47:48 PM (14 years ago)
Author:
Christian Boos
Comment:

start a section on #Transclusion

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/Proposals/AdvancedWikiFormatting

    v35 v36  
    129129==== Alternative forms of linking ==== #linking
    130130
    131  - shorthand for `[[Image(<img>)]]`: `{{<img>}}`, see MoinMoin:HelpOnLinking; `{{...}}` is also used for [MediaWiki:Help:Template transclusion] in MediaWiki
     131 - shorthand for `[[Image(<img>)]]`: `{{<img>}}`, see MoinMoin:HelpOnLinking; `{{...}}` will also be used for [#Transclusion transclusion]
    132132 - shorthand for footnotes? see #9037
    133133
     
    166166 - others?
    167167
     168== The really advanced stuff...
     169
     170(Most likely post-0.13)
     171
     172=== Transclusion
     173
     174The basic idea is that the content of a Wiki page can be reused and displayed in some other places, typically another wiki page which aggregates the content of several other pages.
     175
     176One typical use case is to transclude a parametric page used as a template (`Template:` namespace - #3021). In order to be really useful, this implies having wiki variables, and some control structures (at the very least simple conditionals).
     177
     178Also, we could have ways to include only //parts// of a page, by using some kind of selector mechanism (XPath or CSS inspired?) on the WikiDom tree.
     179
     180Some existing implementations can serve as good starting points [http://twiki.org/cgi-bin/view/Codev/ParameterizedIncludes ParameterizedIncludes] in TWiki, [MediaWiki:Help:Template Template] in MediaWiki, [MoinMoin:HelpOnLinking#Embedding Embedding] and [MoinMoin:HelpOnMacros/Include Include] in MoinMoin and the [http://www.dokuwiki.org/plugin:include plugin:include] of DokuWiki.
     181
     182Trac could use both the `{{<resource>}}` syntax and a more explicit Include macro/WikiProcessor. The latter form would allow to pass "complex" parameters for template, e.g.
     183{{{
     184{{{#!include page="Template:ReleaseInfo" version="1.0"
     185 {{{#!param name="description"
     186 This version is feature complete, mind you.
     187  - all existing tickets are implemented
     188  - there are no known (or unknown) bugs
     189  - there's even no feature left to be implemented, all is there
     190 }}}
     191}}}
     192}}}
     193Alternatively, the default content of the include processor could be made available to the  wiki variables present in the template in a special variable, e.g. "INCLUDE_CONTENT".
     194
     195Variables expansion could also be done using a dedicated syntax (e.g. `@INCLUDE_CONTENT@`, like [MoinMoin:HelpOnVariables MoinMoin] or [http://www.dokuwiki.org/plugin:templater plugin:templater] in dokuwiki), (to be continued...)
     196
     197See also #4468.