TrailPageDescription
Questions answered by this recipe
- How can I add additional information below the trails-arrows.
- How can I create them at one place, best within the trail-index-page.
Description
Use GroupFooters, PTV and pagelist for easy commenting trailpages
The idea is to let a pagelist in the GroupFooter check the pagesname if it is stored in any Trailindex within a TrailsGroup. If so to output the trail-arrows and to readout a PTV from the found Trailindex, which keeps the additional comment to the page, belonging to the intention of this trail.
Setup a TrailIndex
TrailIndexPages are stored in group called TrailsGroup. To every listitem of the trail add a PTV in the form "GroupPage" without any dot. (I'll discuss this later on.) This will be the comments below the trail-arrows.
Trails.TestTrail
(:title A Testtrail:) * [[GroupA.Page1]] :GroupAPage1: comment on Page1 //a PTV named like the $FullName without dot * [[GroupB.Page1]] :GroupBPage1: comment on Page1 (B) * [[GroupC.Page2]] :GroupCPage2: comment on Page2
Aim
In the footersection lets say of GroupB.Page1 should appear sth. like this automatically
GroupA.Page1<<A Testtrail>>GroupC.Page2
comment on Page1 (B)
Setup the GroupFooter or the AllGroupFooter
I set up the Site.AllGroupFooter, like it is described in the AllGroupHeader-recipe. But it works within a GroupFooter too. Put this in the GroupFooter
(:pagelist group=TrailsGroup name=-RecentChanges fmt=#commentedtrail:)
So you resolve all the Pages within the TrailsGroup, except the RecentChanges, which is a IndexPage too, but not needed.
Setup the Pagelistformat
The fmt=#commentedtrail
points to a pagelisttemplate in the Site.LocalTemplates. So put the following there.
I used something like this
[[#commentedtrail]] (:if ontrail {=$FullName} {*$FullName}:) >>frame center font-size=smaller<< <<|[[{=$FullName}| +]]|>> {{=$FullName}$:{*$Group}{*$Name}} >><< (:ifend:) [[#commentedtrailend]]
Keep in mind {=$FullName}
is a TrailIndex-Page resolved from the pageslist, but {*$FullName}
is the actual Page which holds the GroupFooter.
Well, thats it. If the page, that I'm on is ontrail of a TrailsGroup-Page (resolved by pagelist), the trailmarkup is set and the comment-PTV is read out and displayed.
Notes
Well, I'm a little unhappy. At one hand trails definitely work with a definition-list, so you can setup a trail in the form
:[[GroupA.Page1]]: some info to page 1 in A :[[GroupB.Page1]]: some info to page 1 in B :[[GroupC.Page2]]: some info to page 2 in C
That would be the hit, BUT i've found no way, to resolve a PTV called [[GroupA.Page1]]
. This is the only reason of the strange setup of PTV like described above. So maybe there are ideas, how to readout a ptv which is a link at the same time.
$PagePathFmt
) with WikiWords. (i.e. if you have WikiWords enabled, MyPageName
will get turned into a link, and will still be usable as a PTV name, e.g. :MyPageName: Some info about that page
.) —Said Achmiz January 03, 2018, at 12:05 PM
At last, I dont know anything about performance within a huge wiki.
Release notes
xian? January 02, 2010, at 04:52 PM a first description
See also
Contributors
Comments
See discussion at TrailPageDescription-Talk
How to shrink the pagelistouput.
settin up the pagelist to looking up IndexPages that link to the calling page like
(:pagelist group=TrailsGroup link={*$FullName} name=-RecentChanges fmt=#commentedtrail:)
would reduce the results to process within the Footer. But there is still need to check if the page is ontrail.
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.