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
* 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
> I am not sure whether page wikitrail can read dynamically created ordered list. I would define template this way:
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
>> [[#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
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
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
_______________________________________________
> 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
> 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
>> [[#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
> 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
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
>> 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
> {=$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).
...
> 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
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
(:pagelist:) doesn't extract page links, it creates lists
of pages.
Or perhaps I'm not understanding the question?
Pm
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