PmWiki.WikiTrails 4.6 KB

12345678910
  1. version=pmwiki-2.1.14 ordered=1 urlencoded=1
  2. agent=Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.0.6) Gecko/20060728 SUSE/1.5.0.6-1.3 Firefox/1.5.0.6
  3. author=Pm
  4. csum=remove top trail
  5. host=24.1.26.255
  6. name=PmWiki.WikiTrails
  7. rev=84
  8. targets=PmWiki.GroupHeaders,PmWiki.WikiStyles,PmWiki.GroupHeader,PmWiki.DocumentationIndex
  9. text=%25audience%25 authors (basic)%0aThe WikiTrails feature allows wiki authors to create "trails" through sequences of pages in the wiki.%0a%0a!!Creating a trail%0a%0aBefore you can use a trail through a group of pages, you have to create a "trail index" on a separate page, which we will call the "trail index page". On that trail index page, you simply create a numbered or bulleted list of links. (So every numbered or bulleted list of links implicitly creates a trail.) It is important that each page name (link) be the first item following each bullet.%0a%0aAn example trail index page: a list like%0a%0a [@%0a * [[TrailPage1]]%0a * Some text. (This won't be in the trail.)%0a * [[TrailPage2]]%0a ** [[TrailPage3]]%0a ** [[TrailPage4]] some other text [[IrrelevantWikiPage]]%0a ** Yet some other text. [[AnotherIrrelevantWikiPage]]. (This won't be in the trail.)%0a ** %25center%25[[would-beTrailPage]] (This won't be in the trail.)%0a @]%0a%0acreates the following "wikitrail":%0a%0a[= TrailPage1 %3c-> TrailPage2 %3c-> TrailPage3 %3c-> TrailPage4 =]%0a%0aObservations:%0a%0a# In general, indentation levels in the page list don't matter -- trails are a linear sequence of pages.%0a# A page is part of the trail only if the page link immediately follows the list markup.%0a%0a!!Using the trail%0a%0aWhat makes a trail "work" is adding ''trail markup'' on the pages in the trail (i.e. the pages that are listed in the bullet/numbered list on the trail index page).%0a%0aTo build a trail, add ''trail markup'' like [@%3c%3c|[[TrailIndexPage]]|>>@] to a page, where `TrailIndexPage is the page, described above, containing the bulleted list of pages in the trail. PmWiki will display the trail markup with links to any previous and next pages in the trail. %0a%0aThe trail markup can be placed anywhere in a page, and a page can contain multiple trail markups. If you are adding a trail to every page in a group, consider setting the trail markup in the [[Group Headers | GroupHeader]] or GroupFooter pages instead of on every individual page in your group.%0a%0aPmWiki defines 2 trail markups:%0a%0a* [@%3c%3c|[[TrailIndexPage]]|>>@] displays as "[=%3c%3c PreviousPage | TrailIndexPage | NextPage >>=]".%0a%0a* [@%3c|[[TrailIndexPage]]|>@] displays as "[=%3c PreviousPage | TrailIndexPage | NextPage >=]", except the appropriate arrow is omitted at the beginning and end of the trail.%0a%0a!!Path trail %0a%0a[@^|[[TrailIndexPage]]|^@] treats the list levels as a hierarchy and displays the "path" to reach the current page (i.e., a "breadcrumb" trail). In the example trail above, the markup [@^|TrailIndexPage|^@] on [@TrailPage4@] would display as "[=TrailIndexPage | TrailPage2 | TrailPage4=]".%0a%0aWiki administrators can change the trail separator of the "path" trail ( [@^|[[TrailIndexPage]]|^@] ) from the default | by setting the variable $TrailPathSep in the ''config.php'' file. For instance $TrailPathSep = ' > '; will output "[=TrailIndexPage > TrailPage2 > TrailPage4=]".%0a%0a!!Circular trails%0a%0aTypically, a trail is a linear list with a first and a last page. However, the trail can be made "circular" by repeating the first page as the last item in the trail index:%0a%0a [@%0a * [[TrailPage1]]%0a * [[TrailPage2]]%0a ...%0a * [[TrailPageN]]%0a * [[TrailPage1]]%0a @]%0a%0aIf the trail index page is intended to be read by others, the last item can be made invisible using [@%25item comment%25@]:%0a%0a [@%0a * [[TrailPage1]]%0a * [[TrailPage2]]%0a ...%0a * [[TrailPageN]]%0a * [[TrailPage1]] %25item comment%25%0a @]%0a%0a!! Cross Group Trails%0a%0aTrail pages on both sides of group boundaries must be fully qualified with group names.%0a%0a%0a!!Other notes%0a%0aThe [@%25trail%25@] markup that is used in many of PmWiki's documentation pages is just a [[WikiStyle(s)]] that creates a grey background, and is not required for WikiTrails to work. It's defined in the [[PmWiki.GroupHeader]] page.%0a%0aTo get it to work, you must create the index page for the trail and the trail pages as stated above. Then you must define the wikistyle you want in the groupheader of the group you want it to appear in. Then you must refer or call to it with the [@%25trail%25@] markup from the trail pages.%0a%0a%25trail%25%3c%3c|[[DocumentationIndex]]|>>
  10. time=1156528553