Changes between Version 8 and Version 9 of TracSubPagesMacro


Ignore:
Timestamp:
Sep 23, 2016, 7:35:02 AM (6 years ago)
Author:
figaro
Comment:

Moved example to functional description

Legend:

Unmodified
Added
Removed
Modified
  • TracSubPagesMacro

    v8 v9  
    66
    77This plugin allows full Trac wiki pages to be displayed inside other Trac wiki pages. This is useful if there is a piece of content (such as a contact table or log) that needs to be displayed in multiple places, as it eliminates the need for each instance of this content to be maintained.
     8
     9The syntax for the subpage macro is as follows:
     10
     11{{{
     12[[subpage(wiki_page[, show_link])]]
     13}}}
     14
     15Where `wiki_page` is the wiki page. No url is needed here, nor a `wiki/` prefix, just the page.
     16
     17The macro supports pages that aren't top-level too ('!BigCategory/SpecificSubject'). The second argument, `showlink` is an optional argument (`true` or `false`) that determines whether or not a link to edit the rendered page will be shown at the bottom of the subpage section. The link reads 'Edit Section' and provides a link directly to the edit page of the referenced wiki page.
     18
     19For example, if a user had created a wiki pages called 'Minutes' and wanted to display it inline in another wiki page without a link to edit it, he or she would add the following entry to the wiki page that is intended to display the extra content:
     20
     21{{{
     22[[subpage(Minutes, False)]]
     23}}}
     24
     25If the user later decided that he or she wanted a link to be placed at the bottom of the inline section for quick editing, the entry should be changed as follows:
     26
     27{{{
     28[[subpage(Minutes)]]
     29}}}
     30
     31Note that the second boolean argument `True` is not needed, as it is assumed by default.
     32
     33'''Limitations'''
     34 * A wiki page needs to exist before you link to it with a subpage macro. This may seem obvious, but the error caused by a broken link isn't very descriptive (yet).
     35 * Please use only wiki formatting for subpages. The use of macros can (and probably will) cause errors.
    836
    937See also: IncludeMacro
     
    3765when you're logged in), you can go to the Plugins section within the Admin area and check 'Enabled' next to !CustomSelectAdmin.
    3866
    39 == Usage
    40 
    41 The syntax for the subpage macro is as follows:
    42 
    43 {{{
    44 [[subpage(wiki_page[, show_link])]]
    45 }}}
    46 
    47 Where `wiki_page` is the wiki page. No url is needed here, nor a `wiki/` prefix, just the page.
    48 
    49 The macro supports pages that aren't top-level too ('!BigCategory/SpecificSubject'). The second argument, `showlink` is an optional argument (`true` or `false`) that determines whether or not a link to edit the rendered page will be shown at the bottom of the subpage section. The link reads 'Edit Section' and provides a link directly to the edit page of the referenced wiki page.
    50 
    5167== Author/Contributors
    5268