[pmwiki-users] Using WikiTrails and PageList to Compile Pages

1 view
Skip to first unread message

Jasyn Jones

unread,
Mar 19, 2012, 2:18:58 AM3/19/12
to PmWiki Users
I've got a WikiTrail of pages, the core of which is Cosms.Orrorsh-TrailIndex .

I use this as a general Table of Contents—via (:include :) inside an rframe—and at the bottom of each individual page (standard PmWiki markup) for an easy way to navigate the collection of pages.

Both work beautifully. I can add and delete pages from the -TrailIndex, and everything updates as it should.

I also have a separate page I want to use as a "Compilation." I used the PageList function, as so:

(:pagelist trail=Cosms.Orrorsh-TrailIndex fmt=#include:)

This, indeed takes all the pages from the TrailIndex and compiles their content into one page:

http://stormknights.jasyn.org/wiki/index.php?n=Cosms.Orrorsh-Sourcebook

Two problems:

1. I would like to insert the title—set via (:title :) on each separate page—as a header, right before the content from that page.

I gather, from the documentation, this involves a custom PageListTemplate, but I cannot figure out (based on the examples) where to create that page, what it should be named, or what the markup should be.

2. When I compile all the pages, it includes the TrailIndex links with each page. I would like to suppress those, if possible.

Again, I gather this could be implemented in a custom PageListTemplate, but I can't figure out the markup.

Thanks in advance for any help.
- -
Jasyn Jones
jasynj (at) gmail (dot) com

"To strive, to seek, to find, and not to yield."
"Ulysses" by Alfred, Lord Tennyson

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

Peter Bowers

unread,
Mar 19, 2012, 3:57:32 AM3/19/12
to Jasyn Jones, PmWiki Users
On Mon, Mar 19, 2012 at 7:18 AM, Jasyn Jones <jas...@gmail.com> wrote:
> 1. I would like to insert the title—set via (:title :) on each separate page—as a header, right before the content from that page.
>
> I gather, from the documentation, this involves a custom PageListTemplate, but I cannot figure out (based on the examples) where to create that page, what it should be named, or what the markup should be.

Here's an example of the content of a pagelist page that to my eye
*should* work but obviously I'm missing something since the titles
don't show up (although the FullName shows up without difficulty)...
Maybe I've got an errant recipe on my system or maybe I'm makng some
obvious error -- hopefully this should get you started in the right
direction or someone else can point out what mistake I'm making...

===(snip)===
(:pagelist name=Test.*Title* fmt=#foo:)

(:if false:)
[[#foo]]
!! {=$TitleSpaced} {=$Title} {=$FullName}
(:include {=$FullName}:)

[[#fooend]]
(:ifend:)
===(snip)===

(Obviously you'll change the name= to your trail=)

This is an example of how to put the custom pagelisttemplate on the
same page where you are using it. If you find that you will use this
template in pagelists from other pages as well then you should include
it in the page Site.LocalTemplates or else specify it by saying
fmt=X.Y-trailIndex#foo.

> 2. When I compile all the pages, it includes the TrailIndex links with each page. I would like to suppress those, if possible.
>
> Again, I gather this could be implemented in a custom PageListTemplate, but I can't figure out the markup.

There's a more elegant way to do this I'm sure, but here's something
that should work...

On each page instead of just having (:include X.Y-TrailIndex:) you
would have this:

(:if ! equal "{*$:SuppressTOC}" 1:)(:include X-Y-TrailIndex:)(:ifend:)

Then on the page where you want the compilation you would make sure to
have this markup somewhere on the page

(:SuppressTOC:1:)

Or you could probably put the (:if ...:)...(:ifend:) on the
X.Y-TrailIndex page itself (with the content of the TOC between
between hte if and the ifend) and that way you wouldn't have to
remember to put the if...ifend on each detail page. That would save
you some effort and the possibility of a lot of errors. I haven't
tested that, but I can't think why it wouldn't work... It would also
give you the flexibility of putting some alternate text in place of
the TOC via (:else:) if you ever wanted to do that...

-Peter

Jasyn Jones

unread,
Mar 19, 2012, 6:04:21 AM3/19/12
to PmWiki Users
Peter Bowers wrote:

> On Mon, Mar 19, 2012 at 7:18 AM, Jasyn Jones <jas...@gmail.com> wrote:

>> 1. I would like to insert the title—set via (:title :) on each separate page—as
>> a header, right before the content from that page.

> Here's an example of the content of a pagelist page that to my eye


> *should* work but obviously I'm missing something since the titles
> don't show up

It worked for me. The titles showed up perfectly. Thank you.

>> 2. When I compile all the pages, it includes the TrailIndex links with each
>> page. I would like to suppress those, if possible.

> There's a more elegant way to do this I'm sure, but here's something
> that should work...

The first option worked to suppress those on the compilation page. I tried the
second, but couldn't get it to work. Which doesn;t matter, because the first option
is fine with me.

Thanks for taking the time to help a newb out.


- -
Jasyn Jones
jasynj (at) gmail (dot) com

"To strive, to seek, to find, and not to yield."
"Ulysses" by Alfred, Lord Tennyson

Check out my Torg webpage, Storm Knights:
stormknights.jasyn.org

Reply all
Reply to author
Forward
0 new messages