Changes between Version 6 and Version 7 of IncludePagesPlugin


Ignore:
Timestamp:
Oct 18, 2016, 8:59:41 PM (7 years ago)
Author:
figaro
Comment:

Moved example to functional description

Legend:

Unmodified
Added
Removed
Modified
  • IncludePagesPlugin

    v6 v7  
    66
    77This is another version of the IncludeMacro. It takes one mandatory item and two optional positional items. The mandatory item is the page name. The optional items are the class of the generated heading and the class of the div surrounding the included page. If the first positional item is missing, no heading will be generated. If the second is missing, no div will be generated.
     8
     9=== Example 1
     10
     11The contents of page "Foo" will be included in the page when the plugin is expanded:
     12
     13{{{
     14[[IncludePages(Foo)]]
     15}}}
     16
     17=== Example 2
     18
     19The contents of page "Foo" will be included in the page. The title of the page will be included in a header div with the class "headclass" as follows:
     20
     21{{{
     22[[IncludePages(Foo, headclass)]]
     23}}}
     24
     25The generated html is then as follows:
     26
     27{{{
     28<div>
     29   <div class="headclass">Foo</div>
     30     { contents of Foo }
     31</div>
     32}}}
     33
     34=== Example 3
     35
     36Contents of page "Foo" are included in the page with a header div with class "headclass", in a div with class "blockclass" as follows:
     37
     38{{{
     39[[IncludePages(Foo, headclass, blockclass)]]
     40}}}
     41
     42The generated html is then as follows:
     43
     44{{{
     45<div class="blockclass">
     46   <div class="headclass">Foo</div>
     47     { contents of Foo }
     48</div>
     49}}}
    850
    951== Bugs/Feature Requests
     
    2971General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page.
    3072
    31 == Example
    32 
    33 The contents of page "Foo" will be included in the page when the plugin is expanded:
    34 
    35 {{{
    36 [[IncludePages(Foo)]]
    37 }}}
    38 
    39 The contents of page "Foo" will be included in the page. The title of the page will be included in a header div with the class "headclass" as follows:
    40 
    41 {{{
    42 [[IncludePages(Foo, headclass)]]
    43 }}}
    44 
    45 {{{
    46 <div>
    47    <div class="headclass">Foo</div>
    48      { contents of Foo }
    49 </div>
    50 }}}
    51 
    52 Contents of page "Foo" are included in the page with a header div with class "headclass", in a div with class "blockclass" as follows:
    53 
    54 {{{
    55 [[IncludePages(Foo, headclass, blockclass)]]
    56 }}}
    57 
    58 {{{
    59 <div class="blockclass">
    60    <div class="headclass">Foo</div>
    61      { contents of Foo }
    62 </div>
    63 }}}
    64 
    6573== Recent Changes
    6674