Startpage >> PmWiki >> WikiTrails

Wiki Trails

PmWiki.WikiTrails History

Hide minor edits - Show changes to output

August 31, 2011, at 11:58 AM by Blahma -
Changed lines 1-163 from:
ighXLJ , [url=http://dfbmslcjaztd.com/]dfbmslcjaztd[/url], [link=http://sikfefnhcmfi.com/]sikfefnhcmfi[/link], http://wkqcmijbfdus.com/
to:
(:Summary: Trails from lists items from a single page:)
(:div class="rfloat frame" style="font-size:smaller; clear:right;" :)
!! Table of contents
* [[#creating | Creating a trail]]
* [[#types | Types of trail]]
* [[#linksyntax | Trail link syntax]]
* [[#using | Using a trail]]
** [[#pathtrail | Path trail]]
** [[#circular-trails | Circular trail]]
* [[#crossgroup | Cross group trails]]
* [[#trailstyle | Trail style]]
* [[#trailpagelists | Trail page lists]]
(:divend:)
(:Audience: authors (basic) :)
The WikiTrails feature allows wiki authors to create "trails" through sequences of pages in the wiki. You simply specify pages and their order on a "trail index", and then place the navigation markup on the pages that you will be navigating.

(Don't confuse the [[PmWiki/PageLists|pagelist]] directive with WikiTrails - they are different animals as explained in the [[#faq|Q and A]] below.)

[[#creating]]
!! Creating a trail

Before 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 [[PmWiki:ListStyles|list]] of links. (So every numbered or bulleted list of links implicitly creates a trail.)
It is important that each page name ([[Links|link]]) be the first item following each bullet; any text or formatting in front of the page name will exclude it from the trail.\\
If you want to format your trail (list), you can [[Cookbook:CSSInWikiPages|include a CSS]].

An example trail index page might contain the list:
[[#trailstart]]
* [[Installation]] how to install
* [[The customisation page->LocalCustomizations]]
* [[PmWiki]] some other text [[PmWiki Philosophy]] [-(The latter won't be in the trail because it is preceded by text)-]
* Yet some other text. [[PmWiki.WikiStyles]] [-(This won't be in the trail because it follows text)-]
* %center%[[PmWiki/Uploads]] [-(This won't be in the trail because it is preceded by the [=%center%=] style.)-]

* Some text [-(This won't be in the trail because it is not a link)-]
* [[PmWiki/PageLists]] {PmWiki/PageLists$:Summary}
* [[http://pmwiki.org]] [-(This won't be in the trail because it is not a page link)-]
** [[PmWiki:InterMap]] [-(This won't be in the trail because it is an [[InterMap]] link)-]
* [[Cookbook:Cookbook]] [-(This won't be in the trail because it is an [[InterMap]] link)-]
: [[PmWiki philosophy]] : [[Design notes]] [-(The first link will, and the second link won't, be in the trail defined by ([[TextFormattingRules#DefinitionLists | definition list]]))-]
* [[#security]][[Security]] [-(This won't be in the trail because its preceded by a (hidden) [[Links#anchors | anchor]])-]
* %newwin%[[Links]] [-(This won't be in the trail because its preceded by a (hidden) [=%newwin%=] style)-]
* ''[[PmWiki/Troubleshooting]]'' [-(This won't be in the trail because its preceded by (hidden) ''italic'' style markup)-]
[[#trailend]]

The list above creates the following "wikitrail", displayed using a [[PageLists|pagelist]]:
(:markup:)
(:pagelist trail={$FullName}#trailstart#trailend fmt={$FullName}#traillist:)
(:markupend:)

!!! Observations

# In general, indentation levels in the page list don't matter -- trails are a linear sequence of pages.
# A page is part of the trail only if the page link immediately follows the list markup.
#The list itself can be [[#linksyntax|delineated]] by the use of [[#list#anchors|anchors]], allowing for multiple lists on a page, or for some list items to be excluded.

[[#types]]
!! Trail types
PmWiki defines 2 trail markups:

* '''[@<<|[[Trail Index Page]]|>>@]''' displays as "[=<< PreviousPage | Trail Index Page | NextPage >>=]".

* '''[@<|[[Trail Index Page]]|>@]''' displays as "[=< PreviousPage | Trail Index Page | NextPage >=]", except the appropriate arrow is omitted at the beginning and end of the trail.

[[#linksyntax]]
!! Trail link syntax
The trail link has the same syntax as a standard [[link(s)]],
this means for example you can specify
* [@<|[[TrailIndexPage | +]]|>@]

Trail links can be restricted by [[links#anchors|anchors]] (links to a specific location within a page),
this means you can have more than one trail on a page, or start a trail from a specific location in a page.
* [@<|[[Trail Index Page#trailstart#trailend]]|>@]

[[#using]]
!! Using the trail

What 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).

To build a trail, add ''trail markup'' like [@<<|[[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.

The 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.

[[#pathtrail]]
!!! Path trail[[#path-trail]]

[@^|[[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=]".

Wiki 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=]".

[[#circular-trails]]
!! Circular trails

Typically, 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:

->[@
* [[TrailPage1]]
* [[TrailPage2]]
...
* [[TrailPageN]]
* [[TrailPage1]]
@]

If the trail index page is intended to be read by others, the last item can be made invisible inside an [@(:if false:)@] block:

->[@
* [[TrailPage1]]
* [[TrailPage2]]
...
* [[TrailPageN]]
(:if false:)
* [[TrailPage1]]
(:ifend:)
@]

[[#crossgroup]]
!! Cross Group Trails
Before version 2.2.1, if your trail contains pages in different groups, it should use full [=[[Group.Name]]=] links instead of just [=[[Name]]=].

!! Other notes
* There is no space between @@<|@@ and @@[=[[link]]=]@@ and @@|>@@; same for the other trail markups.
* Note that non-existing pages will appear in the WikiTrail as links.

[[#trailstyle]]
!!! Trail style
PmWiki encapsulates the trail with a ''wikitrail'' css class.
This allows the wiki trail to be [[LocalCustomizations | customised]] by defining CSS for the ''wikitrail'' in the ''local.css'' file.


[[#trailpagelists]]
!!! Trail in [[page lists]]
Trails from a single page can only be displayed using the pagelist [[PmWiki/PageLists#pagelisttrail|trail]] parameter. For example
(:markup class="horiz":)
(:pagelist trail=PmWiki/WikiTrails fmt=PmWiki.WikiTrails#traillist order=random count=3:)
(:markupend:)

!!!A simple example of a WikiTrail

1) On the TrailIndexPage:

[@
* [[MyTrailPage1]]
* [[MyTrailPage2]]
* [[MyTrailPage3]]
@]

2) On the pages MyTrailPage1, 2, and 3:

[@
<<|[[TrailIndexPage]]|>>
@]

>>comment<<
[[#traillist]]
%font-size:small green%> [[{=$FullName}|{=$Groupspaced}.{=$Namespaced}]] <
[[#traillistend]]
>><<

!! Questions
[[#faq]]
>>faq<<
Q: What's the difference between a [[[[PmWiki/PageLists|PageList]] and a WikiTrail?
A: The pagelist directive dynamically generates a list of pages. There are many ways to generate the list, including using a WikiTrail as the source. The pagelist directive then displays the pages that match the criteria using an optional template - for example displaying each page name on a separate line as a link or including the entire content. The pagelist directive currently does not have built-in navigation markup that you can put on the pages in the list. By contrast, WikiTrails are simply specified via links on an "index" page and you ''can'' put previous-next navigation markup on each page. The two serve very different purposes. WikiTrails are useful for specifying the pages in [[PmWiki/WebFeeds|web feeds]], for creating a "tour" through a predefined set of pages, and many other things.
August 26, 2011, at 08:09 PM by qvkdjeubmhg - twGFUhRTFrFUlnJzS
Changed line 1 from:
That's 2 celevr by half and 2x2 clever 4 me. Thanks!
to:
ighXLJ , [url=http://dfbmslcjaztd.com/]dfbmslcjaztd[/url], [link=http://sikfefnhcmfi.com/]sikfefnhcmfi[/link], http://wkqcmijbfdus.com/
August 26, 2011, at 07:58 PM by Jasemin - rjcDZVSVX
Changed line 1 from:
Posts like this bgirthen up my day. Thanks for taking the time.
to:
That's 2 celevr by half and 2x2 clever 4 me. Thanks!
August 26, 2011, at 07:22 PM by Susy - ZpGpJXRNdFRXgRa
Changed line 1 from:
If information were scoecr, this would be a goooooal!
to:
Posts like this bgirthen up my day. Thanks for taking the time.
August 26, 2011, at 06:48 PM by Ronalee - HNQDAooIqlBsPBVDxdc
Changed line 1 from:
Super informtaive writing; keep it up.
to:
If information were scoecr, this would be a goooooal!
August 26, 2011, at 06:40 PM by Lakiesha - LIHTjUpiO
Changed line 1 from:
The genius store claled, they're running out of you.
to:
Super informtaive writing; keep it up.
August 26, 2011, at 05:43 PM by Tyya - nqGoInvcwF
Changed line 1 from:
sbla3K <a href="http://pvllhzpbbehd.com/">pvllhzpbbehd</a>
to:
The genius store claled, they're running out of you.
August 26, 2011, at 12:57 PM by kdrzjiwfl - KuxrqvaPoWIdtRqtrob
Changed line 1 from:
Extremely helpful article, paelse write more.
to:
sbla3K <a href="http://pvllhzpbbehd.com/">pvllhzpbbehd</a>
August 26, 2011, at 07:50 AM by Keesha - XGPLwDmxCZ
Changed line 1 from:
Hahahaha. I'm not too birght today. Great post!
to:
Extremely helpful article, paelse write more.
August 26, 2011, at 06:37 AM by Lucka - lluwBJDACSGIBv
Changed line 1 from:
This site is like a calssoorm, except I don't hate it. lol
to:
Hahahaha. I'm not too birght today. Great post!
August 26, 2011, at 03:09 AM by Deacon - MYPUeFGk
Changed line 1 from:
Well macaadima nuts, how about that.
to:
This site is like a calssoorm, except I don't hate it. lol
August 25, 2011, at 09:08 PM by Kaedon - HmoNtqzHEEaIM
Changed line 1 from:
Now we know who the ssienble one is here. Great post!
to:
Well macaadima nuts, how about that.
August 25, 2011, at 08:57 PM by Geraldine - MXYAWoFKjC
Changed line 1 from:
I was so confused about what to buy, but this makes it udnerstndaalbe.
to:
Now we know who the ssienble one is here. Great post!
July 19, 2011, at 06:53 PM by Quiana - tkjArsZrcPMTpIV
Changed line 1 from:
I really appreciate free, succinct, relibale data like this.
to:
I was so confused about what to buy, but this makes it udnerstndaalbe.
July 19, 2011, at 05:59 PM by Cherry - kuIcEkIwPvGxD
Changed line 1 from:
Please keep trhownig these posts up they help tons.
to:
I really appreciate free, succinct, relibale data like this.
July 19, 2011, at 04:55 PM by Emberlynn - NgywcWBcuEGKAZ
Changed line 1 from:
I was seriusoly at DefCon 5 until I saw this post.
to:
Please keep trhownig these posts up they help tons.
July 19, 2011, at 04:15 PM by Jennabel - MrkLZvznz
Changed line 1 from:
Begun, the great interent education has.
to:
I was seriusoly at DefCon 5 until I saw this post.
July 18, 2011, at 08:29 PM by Terry - DYswJpPGYzIN
Changed line 1 from:
I wnaetd to spend a minute to thank you for this.
to:
Begun, the great interent education has.
July 18, 2011, at 09:16 AM by Kailey - KCMaTfMYiiFZhthU
Changed line 1 from:
Touchdown! That's a really cool way of puittng it!
to:
I wnaetd to spend a minute to thank you for this.
July 18, 2011, at 01:53 AM by Armena - lDdLczSrzRuQcrRHz
Changed line 1 from:
It was dark when I woke. This is a ray of snushine.
to:
Touchdown! That's a really cool way of puittng it!
July 17, 2011, at 08:11 PM by Jodecy - jqAYNxfu
Changed line 1 from:
Well put, sir, well put. I'll ceratinly make note of that.
to:
It was dark when I woke. This is a ray of snushine.
July 08, 2011, at 09:04 PM by Kristanna - TaSkfQyGIXHN
Changed line 1 from:
UKKOXm , [url=http://rotbsqrvmnlt.com/]rotbsqrvmnlt[/url], [link=http://ygfnyfhbyjij.com/]ygfnyfhbyjij[/link], http://rqrmtjrhzrks.com/
to:
Well put, sir, well put. I'll ceratinly make note of that.
July 07, 2011, at 03:34 PM by jyrpbgrqotl - MCJQaLKR
Changed line 1 from:
5EMnVR <a href="http://fpopdeqqgxvc.com/">fpopdeqqgxvc</a>
to:
UKKOXm , [url=http://rotbsqrvmnlt.com/]rotbsqrvmnlt[/url], [link=http://ygfnyfhbyjij.com/]ygfnyfhbyjij[/link], http://rqrmtjrhzrks.com/
July 07, 2011, at 09:20 AM by aurnsnjknh - KOrtdJoWtypvJBpNwI
Changed line 1 from:
Hey, sbtule must be your middle name. Great post!
to:
5EMnVR <a href="http://fpopdeqqgxvc.com/">fpopdeqqgxvc</a>
July 06, 2011, at 12:34 PM by Honey - xVhVIesiAd
Changed lines 1-163 from:
(:Summary: Trails from lists items from a single page:)
(:div class="rfloat frame" style="font-size:smaller; clear:right;" :)
!! Table of contents
* [[#creating | Creating a trail]]
* [[#types | Types of trail]]
* [[#linksyntax | Trail link syntax]]
* [[#using | Using a trail]]
** [[#pathtrail | Path trail]]
** [[#circular-trails | Circular trail]]
* [[#crossgroup | Cross group trails]]
* [[#trailstyle | Trail style]]
* [[#trailpagelists | Trail page lists]]
(:divend:)
(:Audience: authors (basic) :)
The WikiTrails feature allows wiki authors to create "trails" through sequences of pages in the wiki. You simply specify pages and their order on a "trail index", and then place the navigation markup on the pages that you will be navigating.

(Don't confuse the [[PmWiki/PageLists|pagelist]] directive with WikiTrails - they are different animals as explained in the [[#faq|Q and A]] below.)

[[#creating]]
!! Creating a trail

Before 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 [[PmWiki:ListStyles|list]] of links. (So every numbered or bulleted list of links implicitly creates a trail.)
It is important that each page name ([[Links|link]]) be the first item following each bullet; any text or formatting in front of the page name will exclude it from the trail.\\
If you want to format your trail (list), you can [[Cookbook:CSSInWikiPages|include a CSS]].

An example trail index page might contain the list:
[[#trailstart]]
* [[Installation]] how to install
* [[The customisation page->LocalCustomizations]]
* [[PmWiki]] some other text [[PmWiki Philosophy]] [-(The latter won't be in the trail because it is preceded by text)-]
* Yet some other text. [[PmWiki.WikiStyles]] [-(This won't be in the trail because it follows text)-]
* %center%[[PmWiki/Uploads]] [-(This won't be in the trail because it is preceded by the [=%center%=] style.)-]

* Some text [-(This won't be in the trail because it is not a link)-]
* [[PmWiki/PageLists]] {PmWiki/PageLists$:Summary}
* [[http://pmwiki.org]] [-(This won't be in the trail because it is not a page link)-]
** [[PmWiki:InterMap]] [-(This won't be in the trail because it is an [[InterMap]] link)-]
* [[Cookbook:Cookbook]] [-(This won't be in the trail because it is an [[InterMap]] link)-]
: [[PmWiki philosophy]] : [[Design notes]] [-(The first link will, and the second link won't, be in the trail defined by ([[TextFormattingRules#DefinitionLists | definition list]]))-]
* [[#security]][[Security]] [-(This won't be in the trail because its preceded by a (hidden) [[Links#anchors | anchor]])-]
* %newwin%[[Links]] [-(This won't be in the trail because its preceded by a (hidden) [=%newwin%=] style)-]
* ''[[PmWiki/Troubleshooting]]'' [-(This won't be in the trail because its preceded by (hidden) ''italic'' style markup)-]
[[#trailend]]

The list above creates the following "wikitrail", displayed using a [[PageLists|pagelist]]:
(:markup:)
(:pagelist trail={$FullName}#trailstart#trailend fmt={$FullName}#traillist:)
(:markupend:)

!!! Observations

# In general, indentation levels in the page list don't matter -- trails are a linear sequence of pages.
# A page is part of the trail only if the page link immediately follows the list markup.
#The list itself can be [[#linksyntax|delineated]] by the use of [[#list#anchors|anchors]], allowing for multiple lists on a page, or for some list items to be excluded.

[[#types]]
!! Trail types
PmWiki defines 2 trail markups:

* '''[@<<|[[Trail Index Page]]|>>@]''' displays as "[=<< PreviousPage | Trail Index Page | NextPage >>=]".

* '''[@<|[[Trail Index Page]]|>@]''' displays as "[=< PreviousPage | Trail Index Page | NextPage >=]", except the appropriate arrow is omitted at the beginning and end of the trail.

[[#linksyntax]]
!! Trail link syntax
The trail link has the same syntax as a standard [[link(s)]],
this means for example you can specify
* [@<|[[TrailIndexPage | +]]|>@]

Trail links can be restricted by [[links#anchors|anchors]] (links to a specific location within a page),
this means you can have more than one trail on a page, or start a trail from a specific location in a page.
* [@<|[[Trail Index Page#trailstart#trailend]]|>@]

[[#using]]
!! Using the trail

What 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).

To build a trail, add ''trail markup'' like [@<<|[[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.

The 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.

[[#pathtrail]]
!!! Path trail[[#path-trail]]

[@^|[[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=]".

Wiki 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=]".

[[#circular-trails]]
!! Circular trails

Typically, 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:

->[@
* [[TrailPage1]]
* [[TrailPage2]]
...
* [[TrailPageN]]
* [[TrailPage1]]
@]

If the trail index page is intended to be read by others, the last item can be made invisible inside an [@(:if false:)@] block:

->[@
* [[TrailPage1]]
* [[TrailPage2]]
...
* [[TrailPageN]]
(:if false:)
* [[TrailPage1]]
(:ifend:)
@]

[[#crossgroup]]
!! Cross Group Trails
Before version 2.2.1, if your trail contains pages in different groups, it should use full [=[[Group.Name]]=] links instead of just [=[[Name]]=].

!! Other notes
* There is no space between @@<|@@ and @@[=[[link]]=]@@ and @@|>@@; same for the other trail markups.
* Note that non-existing pages will appear in the WikiTrail as links.

[[#trailstyle]]
!!! Trail style
PmWiki encapsulates the trail with a ''wikitrail'' css class.
This allows the wiki trail to be [[LocalCustomizations | customised]] by defining CSS for the ''wikitrail'' in the ''local.css'' file.


[[#trailpagelists]]
!!! Trail in [[page lists]]
Trails from a single page can only be displayed using the pagelist [[PmWiki/PageLists#pagelisttrail|trail]] parameter. For example
(:markup class="horiz":)
(:pagelist trail=PmWiki/WikiTrails fmt=PmWiki.WikiTrails#traillist order=random count=3:)
(:markupend:)

!!!A simple example of a WikiTrail

1) On the TrailIndexPage:

[@
* [[MyTrailPage1]]
* [[MyTrailPage2]]
* [[MyTrailPage3]]
@]

2) On the pages MyTrailPage1, 2, and 3:

[@
<<|[[TrailIndexPage]]|>>
@]

>>comment<<
[[#traillist]]
%font-size:small green%> [[{=$FullName}|{=$Groupspaced}.{=$Namespaced}]] <
[[#traillistend]]
>><<

!! Questions
[[#faq]]
>>faq<<
Q: What's the difference between a [[[[PmWiki/PageLists|PageList]] and a WikiTrail?
A: The pagelist directive dynamically generates a list of pages. There are many ways to generate the list, including using a WikiTrail as the source. The pagelist directive then displays the pages that match the criteria using an optional template - for example displaying each page name on a separate line as a link or including the entire content. The pagelist directive currently does not have built-in navigation markup that you can put on the pages in the list. By contrast, WikiTrails are simply specified via links on an "index" page and you ''can'' put previous-next navigation markup on each page. The two serve very different purposes. WikiTrails are useful for specifying the pages in [[PmWiki/WebFeeds|web feeds]], for creating a "tour" through a predefined set of pages, and many other things.
to:
Hey, sbtule must be your middle name. Great post!
Lasta ŝanĝo August 31, 2011, at 11:58 AM