https://github.com/trac-hacks/tracsubpages
Trac plugin for embedding wiki pages in other wiki pages
https://github.com/trac-hacks/tracsubpages
trac-plugin
Last synced: about 1 year ago
JSON representation
Trac plugin for embedding wiki pages in other wiki pages
- Host: GitHub
- URL: https://github.com/trac-hacks/tracsubpages
- Owner: trac-hacks
- License: gpl-3.0
- Created: 2010-07-02T03:03:22.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2018-09-17T00:59:36.000Z (over 7 years ago)
- Last Synced: 2025-02-20T09:16:11.163Z (over 1 year ago)
- Topics: trac-plugin
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES
- License: LICENSE
Awesome Lists containing this project
README
Overview
========
TracSubPages is a Trac plugin that supplies a macro allowing full wiki pages to be displayed inside of other 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.
Usage
-----
The syntax for the subpage macro is simple::
[[subpage(wiki_page, [show_link])]]
Where `wiki_page` is the wiki page (No url is needed here, nor 'wiki/', just the page). 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).
For 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::
[[subpage(Minutes, False)]]
If 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::
[[subpage(Minutes)]]
Note that the second boolean argument 'True' is not needed, as it is assumed by default.
Limitations
-----------
* 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).
* Please use only wiki formatting for subpages. The use of macros can (and probably will) cause errors.