[pmwiki-users] WikiTrails and pagelists

0 views
Skip to first unread message

Christophe David

unread,
Apr 6, 2007, 3:18:23 PM4/6/07
to pmwiki...@pmichaud.com
Could somebody please tell me if  the list needed to create a wikitrail can be generated by a pagelist ?

I tried the following and all variants I could think of, without success.  When I create the index list manually, everythings works fine.

- Define a wikitrail in a group footer with <|[[IndexPage|index]]|>
- In IndexPage,  (:pagelist group=MyGroup fmt=#TrailIndex:)
- In Site.LocalTemplates:

[[#TrailIndex]]
*[[{=$Group}.{=$Name}]]
[[#TrailIndexend]]

I am expecting too much or is the syntax incorrect ?

Thank you in anticipation.

Christophe

Roman

unread,
Apr 6, 2007, 4:20:57 PM4/6/07
to pmwiki...@pmichaud.com

I am not sure whether page wikitrail can read dynamically created
ordered list. I would define template this way:

[[#trailindex]]
(:if equal {$FullName} {=$FullName}:)<< [[{<$FullName}|+]] |
[[{=$FullName}|+]] | [[{>$FullName}|+]] >>(:if:)
[[#trailindexend]]

And then put (:pagelist group=MyGroup fmt=#TrailIndex:) directly to GroupFooter.

Roman

_______________________________________________
pmwiki-users mailing list
pmwiki...@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Dr Fred C

unread,
Apr 6, 2007, 8:51:28 PM4/6/07
to pmwiki...@pmichaud.com

> I am not sure whether page wikitrail can read dynamically created
> ordered list.
FYI, in the big picture, as one who has been there and done that writing
code for a similarly open ended system about a bazillion years ago
(before internet days), one of the intriguing things about PMwiki and
similarly open ended language systems is how the language (from low to
high levels) can be utilized in implementations that it wasn't initially
intended by the software wyzards developing the project.

* The sign of true wyzardry is when these sorts of features actually
work without additional code touch up.
* The sign of good wyzardry is when a few minor enhancements make it
work.
* The sign of BS Software wizardry is when the project can't
possibly be modified without a significant rewrite...

IMHO, while PMwiki has some issues, on a wyzardry scale of 1-10, it's
above an 8. In contemporary webware, that's exceptional...

--

Always, Dr Fred C
drf...@drfredc.com

Christophe David

unread,
Apr 7, 2007, 3:20:09 AM4/7/07
to Roman, pmwiki...@pmichaud.com
> I am not sure whether page wikitrail can read dynamically created ordered list. I would define template this way:

This does exactly what I wanted in a much more elegant way than I had imagined.

Thanks a lot.

Christophe

Patrick R. Michaud

unread,
Apr 13, 2007, 5:57:33 PM4/13/07
to Roman, pmwiki...@pmichaud.com
On Fri, Apr 06, 2007 at 10:20:57PM +0200, Roman wrote:
> I am not sure whether page wikitrail can read dynamically created
> ordered list. I would define template this way:
>
> [[#trailindex]]
> (:if equal {$FullName} {=$FullName}:)<< [[{<$FullName}|+]] |
> [[{=$FullName}|+]] | [[{>$FullName}|+]] >>(:if:)
> [[#trailindexend]]

This is so incredibly useful and obvious (in hindsight) that I think
it ought to be in the core Site.PageListTemplates.

Then people can do (:pagelist fmt=#trail:) and have a trail built
from a pagelist.

We could even develop a faster fmt=trail version (no #) that
avoids the need to process a long list of records just to output
a single line.

Pm

Hans

unread,
Apr 13, 2007, 6:09:27 PM4/13/07
to Patrick R. Michaud, pmwiki...@pmichaud.com
Friday, April 13, 2007, 10:57:33 PM, Patrick wrote:

>> [[#trailindex]]
>> (:if equal {$FullName} {=$FullName}:)<< [[{<$FullName}|+]] |
>> [[{=$FullName}|+]] | [[{>$FullName}|+]] >>(:if:)
>> [[#trailindexend]]

> This is so incredibly useful and obvious (in hindsight) that I think
> it ought to be in the core Site.PageListTemplates.

In the past there was a problem with this for the first and last page.
Has this been resolved?


~Hans

Hans

unread,
Apr 13, 2007, 6:14:37 PM4/13/07
to pmwiki...@pmichaud.com

Kathryn Andersen

unread,
Apr 13, 2007, 7:58:01 PM4/13/07
to pmwiki...@pmichaud.com
On Fri, Apr 13, 2007 at 04:57:33PM -0500, Patrick R. Michaud wrote:
> On Fri, Apr 06, 2007 at 10:20:57PM +0200, Roman wrote:
> > I am not sure whether page wikitrail can read dynamically created
> > ordered list. I would define template this way:
> >
> > [[#trailindex]]
> > (:if equal {$FullName} {=$FullName}:)<< [[{<$FullName}|+]] |
> > [[{=$FullName}|+]] | [[{>$FullName}|+]] >>(:if:)
> > [[#trailindexend]]
>
> This is so incredibly useful and obvious (in hindsight) that I think
> it ought to be in the core Site.PageListTemplates.

Oh yes please!



> Then people can do (:pagelist fmt=#trail:) and have a trail built
> from a pagelist.
>
> We could even develop a faster fmt=trail version (no #) that
> avoids the need to process a long list of records just to output
> a single line.

That would be lovely!

I use this kind of code a lot on my wiki, and it would be great if it
were faster.

Kathryn Andersen
--
_--_|\ | Kathryn Andersen <http://www.katspace.com>
/ \ |
\_.--.*/ | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
v |
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe

Kathryn Andersen

unread,
Apr 13, 2007, 8:02:41 PM4/13/07
to pmwiki...@pmichaud.com
On Fri, Apr 13, 2007 at 11:09:27PM +0100, Hans wrote:
> Friday, April 13, 2007, 10:57:33 PM, Patrick wrote:
>
> >> [[#trailindex]]
> >> (:if equal {$FullName} {=$FullName}:)<< [[{<$FullName}|+]] |
> >> [[{=$FullName}|+]] | [[{>$FullName}|+]] >>(:if:)
> >> [[#trailindexend]]
>
> > This is so incredibly useful and obvious (in hindsight) that I think
> > it ought to be in the core Site.PageListTemplates.
>
> In the past there was a problem with this for the first and last page.
> Has this been resolved?

I found that this problem gets fixed if one explicitly uses the $Title
rather than the + markup:

[[#trailindex]]
(:if equal {*$FullName} {=$FullName}:)<< [[{<$FullName}|{<$Title}]] |
[[{=$FullName}|{=$Title}]] | [[{>$FullName}|{>$Title}]] >>(:ifend:)
[[#trailindexend]]

Kathryn Andersen
--
_--_|\ | Kathryn Andersen <http://www.katspace.com>
/ \ |
\_.--.*/ | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
v |
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe

_______________________________________________

Vince Administration

unread,
Apr 13, 2007, 8:59:23 PM4/13/07
to Kathryn Andersen, pmwiki...@pmichaud.com

On Apr 13, 2007, at 8:02 PM, Kathryn Andersen wrote:

> On Fri, Apr 13, 2007 at 11:09:27PM +0100, Hans wrote:
>> Friday, April 13, 2007, 10:57:33 PM, Patrick wrote:
>>
>>>> [[#trailindex]]
>>>> (:if equal {$FullName} {=$FullName}:)<< [[{<$FullName}|+]] |
>>>> [[{=$FullName}|+]] | [[{>$FullName}|+]] >>(:if:)
>>>> [[#trailindexend]]
>>
>>> This is so incredibly useful and obvious (in hindsight) that I think
>>> it ought to be in the core Site.PageListTemplates.
>>
>> In the past there was a problem with this for the first and last
>> page.
>> Has this been resolved?
>
> I found that this problem gets fixed if one explicitly uses the $Title
> rather than the + markup:
>
> [[#trailindex]]
> (:if equal {*$FullName} {=$FullName}:)<< [[{<$FullName}|{<$Title}]] |
> [[{=$FullName}|{=$Title}]] | [[{>$FullName}|{>$Title}]] >>(:ifend:)
> [[#trailindexend]]

As someone who has not grown up with this, it would be incredibly
useful if
someone would say in words what this does. I am very confused.

Thanks, Vince

Roman

unread,
Apr 16, 2007, 9:21:31 AM4/16/07
to Vince Administration, pmwiki...@pmichaud.com
On 4/14/07, Vince Administration <vad...@math.uconn.edu> wrote:
>
> On Apr 13, 2007, at 8:02 PM, Kathryn Andersen wrote:
>
> > On Fri, Apr 13, 2007 at 11:09:27PM +0100, Hans wrote:
> >> Friday, April 13, 2007, 10:57:33 PM, Patrick wrote:
> >>
> >>>> [[#trailindex]]
> >>>> (:if equal {$FullName} {=$FullName}:)<< [[{<$FullName}|+]] |
> >>>> [[{=$FullName}|+]] | [[{>$FullName}|+]] >>(:if:)
> >>>> [[#trailindexend]]
> >>
> >>> This is so incredibly useful and obvious (in hindsight) that I think
> >>> it ought to be in the core Site.PageListTemplates.
> >>
> >> In the past there was a problem with this for the first and last
> >> page.
> >> Has this been resolved?
> >
> > I found that this problem gets fixed if one explicitly uses the $Title
> > rather than the + markup:
> >
> > [[#trailindex]]
> > (:if equal {*$FullName} {=$FullName}:)<< [[{<$FullName}|{<$Title}]] |
> > [[{=$FullName}|{=$Title}]] | [[{>$FullName}|{>$Title}]] >>(:ifend:)
> > [[#trailindexend]]
> As someone who has not grown up with this, it would be incredibly
> useful if
> someone would say in words what this does. I am very confused.
>
> Thanks, Vince

With traditional wikitrail you have to create and maintain list of
pages manually. Pagelist markup helps you to create list of pages
dynamically and the above pagelist template formats the results as
traditional wikitrail. Once you create new page with name matching
pagelist name= or group= criteria it appears in such "wikitrail"
automatically.

Roman

christian....@gmail.com

unread,
Apr 16, 2007, 9:51:24 AM4/16/07
to pmwiki...@pmichaud.com
On Mon, 16 Apr 2007, Roman wrote:

> With traditional wikitrail you have to create and maintain list of pages
> manually. Pagelist markup helps you to create list of pages dynamically
> and the above pagelist template formats the results as traditional
> wikitrail. Once you create new page with name matching pagelist name= or
> group= criteria it appears in such "wikitrail" automatically.

Are dynamic wiki trails now working? Is there an example or documentation
somewhere that I could look at?

Oh... now I remember. I wanted the ability to let the dynamic part of the
wiki trail exclude pages that already existed in the static part of the
trail. Is that possible?

The reason for having a static and dynamic part is that I'd like to be
able to generate a trail of pages like this (the names of the pages are
completely arbitrary, I just used 'Page<n>' due to lack of imagination)

* [[Page 1]]
* [[Page 2]]
** [[Page 2a]]
(:pagelist ???? :) - results in some pages
* [[Page 10]]
* [[Page 11]]
** (:pagelist ???? :) - pages that should be listed here

* [[Page ...]]

(:pagelist <the-rest>:) - any pages not listed above

This would let me use the trail index page to impose order on the pages
that belong to the wiki trail, and still use (:pagelist:) to make sure
that the trail contains all the pages.

Is the above possible?

Best regards
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr

Hans

unread,
Apr 16, 2007, 9:52:41 AM4/16/07
to Vince Administration, pmwiki...@pmichaud.com
Saturday, April 14, 2007, 1:59:23 AM, Vince wrote:

>> [[#trailindex]]


>> (:if equal {*$FullName} {=$FullName}:)<< [[{<$FullName}|{<$Title}]] |
>> [[{=$FullName}|{=$Title}]] | [[{>$FullName}|{>$Title}]] >>(:ifend:)
>> [[#trailindexend]]
> As someone who has not grown up with this, it would be incredibly
> useful if
> someone would say in words what this does. I am very confused.

This is a pagelist format template. Pagelist will have a list of
pagenames, perhaps all names in one group etc. according to parameters
set within the pagelist directive. The formatting template tells
Pagelist what to output in what form:

Here we got:


(:if equal {*$FullName} {=$FullName}:)

Pagelist checks if the current name it processes from its list
"{=$FullName}" matches the name of the page, or better the name of the
page it is referring to (it could be in the Groupfooter, but
{*$FullName} refers to the main page, not the GroupFooter). So if thee
is a match Pagelist will output on one line:
<< - two angle brackets you see,
[[{<$FullName}|{<$Title}]] - a link to the previous pagename on the
list, displayed by its title,
| - a pipe character you see,
[[{=$FullName}|{=$Title}]] - a link to the current page by its title,
| - another pipe charcter,
[[{>$FullName}|{>$Title}]] - a link to the following page on its list,
displayed by its title,
>> - two more angel brackets you see.
Then the condition ends. Nothing else is shown.

In other words the output looks like:
<< PrevPage | ThisPage | NextPage >>
with the actual titles of the pages showing, and as links.

{=$FullName} is the current name the pagelist processes.
{<$FullName} is the previous page on its list, and
{>$FullName} is the next page on its list.

Hope this helps to make it clearer.


~Hans

Hans

unread,
Apr 16, 2007, 9:54:13 AM4/16/07
to christian....@gmail.com, pmwiki...@pmichaud.com
Monday, April 16, 2007, 2:51:24 PM, christian wrote:

> Are dynamic wiki trails now working? Is there an example or documentation
> somewhere that I could look at?

see http://www.pmwiki.org/wiki/Cookbook/DynamicTrails


~Hans

Patrick R. Michaud

unread,
Apr 16, 2007, 10:03:27 AM4/16/07
to christian....@gmail.com, pmwiki...@pmichaud.com
On Mon, Apr 16, 2007 at 03:51:24PM +0200, christian....@gmail.com wrote:
> Oh... now I remember. I wanted the ability to let the dynamic part of the
> wiki trail exclude pages that already existed in the static part of the
> trail. Is that possible?
>
> The reason for having a static and dynamic part is that I'd like to be
> able to generate a trail of pages like this (the names of the pages are
> completely arbitrary, I just used 'Page<n>' due to lack of imagination)
>
> * [[Page 1]]
> * [[Page 2]]
> ** [[Page 2a]]
> (:pagelist ???? :) - results in some pages
> * [[Page 10]]
> * [[Page 11]]
> ** (:pagelist ???? :) - pages that should be listed here
>
> * [[Page ...]]
>
> (:pagelist <the-rest>:) - any pages not listed above
>
> This would let me use the trail index page to impose order on the pages
> that belong to the wiki trail, and still use (:pagelist:) to make sure
> that the trail contains all the pages.
>
> Is the above possible?

Not yet, but I'm planning to make it possible via a
trail=-TrailPage option to (:pagelist:). This would exclude
all of the pages on TrailPage.

Either that or we'd go with the save/include/exclude mechanism
discussed in a previous thread, that would allow arbitrary
combinations of pagelists.

Pm

christian....@gmail.com

unread,
Apr 16, 2007, 10:07:15 AM4/16/07
to Patrick R. Michaud, pmwiki...@pmichaud.com
On Mon, 16 Apr 2007, Patrick R. Michaud wrote:

>> The reason for having a static and dynamic part is that I'd like to be
>> able to generate a trail of pages like this (the names of the pages are
>> completely arbitrary, I just used 'Page<n>' due to lack of imagination)
>>
>> * [[Page 1]]
>> * [[Page 2]]
>> ** [[Page 2a]]
>> (:pagelist ???? :) - results in some pages
>> * [[Page 10]]
>> * [[Page 11]]
>> ** (:pagelist ???? :) - pages that should be listed here
>>
>> * [[Page ...]]
>>
>> (:pagelist <the-rest>:) - any pages not listed above
>>
>> This would let me use the trail index page to impose order on the pages
>> that belong to the wiki trail, and still use (:pagelist:) to make sure
>> that the trail contains all the pages.
>>
>> Is the above possible?
>
> Not yet, but I'm planning to make it possible via a
> trail=-TrailPage option to (:pagelist:). This would exclude
> all of the pages on TrailPage.
>
> Either that or we'd go with the save/include/exclude mechanism discussed
> in a previous thread, that would allow arbitrary combinations of
> pagelists.

Ok. The important thing for me was really to explain the user case.

cheers

Hans

unread,
Apr 16, 2007, 10:05:00 AM4/16/07
to Vince Administration, pmwiki...@pmichaud.com
Monday, April 16, 2007, 2:52:41 PM, Hans wrote:

> {=$FullName} is the current name the pagelist processes.
> {<$FullName} is the previous page on its list, and
{>>$FullName} is the next page on its list.

To be a little clearer: "the pagelist processes" in above statement
refers to the relevant pagelist function (from scripts/pagelist.php).
In particular function FPLTemplate handles PagelistTemplates, whereas
MakePageList creates the list of page names first, which FPLTemplate
then processes (if I got that right, there are more helper functions
etc).

Martin Fick

unread,
Apr 18, 2007, 12:44:47 PM4/18/07
to Patrick R. Michaud, Roman, pmwiki...@pmichaud.com
--- "Patrick R. Michaud" <pmic...@pobox.com> wrote:
> On Fri, Apr 06, 2007 at 10:20:57PM +0200, Roman
> wrote:
> > I am not sure whether page wikitrail can read
> dynamically created
> > ordered list. I would define template this way:
> >
> > [[#trailindex]]
> > (:if equal {$FullName} {=$FullName}:)<<
> [[{<$FullName}|+]] |
> > [[{=$FullName}|+]] | [[{>$FullName}|+]] >>(:if:)
> > [[#trailindexend]]

...

> We could even develop a faster fmt=trail version (no
> #) that avoids the need to process a long list of
> records just to output a single line.

Instead of:

(:if equal {$FullName} {=$FullName}:)

what about adding the ability to simply force an if
evaluation inside the templating engine before any
markup (the way 'first' and 'last' are evaluated) like
this:

(:template if equal {$FullName} {=$FullName}:)

Would that potentially provide any speedups?

-Martin


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Simon

unread,
Apr 20, 2007, 4:10:38 AM4/20/07
to pmwiki...@pmichaud.com
>From the discussion about trails and pagelists (great idea)

is it possible to extend (perhaps in a recipe)
pagelists to extract either urls (http:) or emails (mailto:)
in a similar way to the way it currently extracts page links.

cheers

Simon

Patrick R. Michaud

unread,
Apr 20, 2007, 9:19:20 AM4/20/07
to Simon, pmwiki...@pmichaud.com
On Fri, Apr 20, 2007 at 08:10:38PM +1200, Simon wrote:
> >From the discussion about trails and pagelists (great idea)
>
> is it possible to extend (perhaps in a recipe)
> pagelists to extract either urls (http:) or emails (mailto:)
> in a similar way to the way it currently extracts page links.

(:pagelist:) doesn't extract page links, it creates lists
of pages.

Or perhaps I'm not understanding the question?

Pm

Simon

unread,
Apr 22, 2007, 3:11:54 AM4/22/07
to pmwiki...@pmichaud.com
Patrick R. Michaud wrote:
On Fri, Apr 20, 2007 at 08:10:38PM +1200, Simon wrote:
  
>From the discussion about trails and pagelists (great idea)

is it possible to extend (perhaps in a recipe)
pagelists to extract either urls (http:) or emails (mailto:)
in a similar way to the way it currently extracts page links.
    
(:pagelist:) doesn't extract page links, it creates lists
of pages.

Or perhaps I'm not understanding the question?

Pm

  
Pagelist can (re)create a wiki trail, (http://pmwiki.org/wiki/PmWiki/WikiTrails - (:pagelist trail= and http://pmwiki.org/wiki/PmWiki/PageLists#pagelisttrail)
Therefore it must in some way pick up a list of (Bulleted) links from a pages contents.
I was just wondering if it was possible to extend this processing of the page's contents to other items such as http:// links or mailto: links
thanks

Simon
Reply all
Reply to author
Forward
0 new messages