I've added a PITS entry for a proposed addition to the (:template ...:) markup. More specifically, I think we should be able to say (:template ! first {=$Group}:) in order to eg. add markup before each item except for the first. Currently to achieve this you need to use (:if equal {=$Group} {<$Group}:), which seems a bit clumsy as most other similar markup has been deprecated. The PITS entry also includes the required changes to scripts/pagelist.php. —Eemeli Aro July 29, 2009, at 08:19 AM


Is there a way to reference the Titlespaced of a group's default page from a page list template?

This would be for the text of a hyperlink. So far I've got

(:template first:)
[[{$Group} | {$Groupspaced}]]  <<< I do mean {$Group} but I want this group's default page's spaced title
(:template ! first:)
[[{=$Name} | {=$Titlespaced}]]

--SteP 2022-08-26

If you know the page name ($Group, or HomePage, or localized), you can do {{=$Group}.{=$Group}$Titlespaced} or {{=$Group}.HomePage$Titlespaced}.

If you don't know the page name (some groups use Group.Group, others Group.HomePage), then not out of the box, but see Cookbook:GroupTitle. --Petko

We should probably add to the core a PageVariable {$GroupHomePage} with the calculated homepage of any page. --Petko

Added for 2.3.11, see PageVariables. --Petko

See also Cookbook.GroupTitle

How to calculate the total value of a PTV in a pagelist?

I have a PTV containing the testresults for students in a course (1, 2, 3 or 4 points per test). In a pagelist I show all the tests of a student together with its individual testresults. In the lastline of the pagelist I want to show the total of each students testpoints. With {$$PageCount} its possible to show the number of the tests but how to sum up the opoints in the correspondig PTV? -- Siegfried Seibert 01.05.2020
Try adding custom Markup Expression (sum num num num) (see MarkupExpressionSamples) and use Pagelists results as arguments Finar May 01, 2020, at 02:54 PM
Thanks for your hint. But the $args in the expression (num num num ...) should be build dynamically by the pagelist, whicht doesn't seem to work. - Siegfried Seibert, May 1, 2020.

Cookbook:MarkupExprPlus provides the expressions set and setq that may do the job. --Petko May 01, 2020, at 05:46 PM

Thanks, Cookbook:MarkupExprPlus works fine - Siegfried May 01, 2020.

Can template last be used when template each includes another pagelist?

Sometimes I notice that the page count that I normally show at the end of my outer pagelist appears right before (instead of right after) the display of the final page. If what I'm doing is not supported, is there some kind of conditional or other markup that can be used within a template in lieu of template last that might work where template last fails?

I am not aware that Template Last should appear before Template Each. Can you demonstrate it here or elsewhere on the wiki? --Petko March 20, 2016, at 06:12 PM

How can I achieve adding a table column only when pagelist outputs something?

There is now a wrap option to (:pagelist:) to allow it to return the markup to the enclosing page, as opposed to rendering it standalone.

Can I use page variables, or even PTVs, in the (:template defaults:) section?

They seem not to work as of 2.2.6. I'd like to do (:template defaults group={*$Group}:) or similar. Maxim? October 11, 2009, at 08:24 AM

Please see, and vote for PITS.00986

Is it possible to transport a link to a uploaded PDF file via PageListTemplate to a pagelist?

I need to manage a lot of standards / codes in a table. To avoid working in a big advanced table I like create a topic for each standard. This topic will have the standard in PDF as an attachment. On this topic I add a few page variables (Name: description: file: etc.)
All these topics I want to collect in a pagelist build from a PageListTemplate.

The user of the wiki shall open the standard direct out of this list and not need to run over the topic.

My try of a template:

(:file:ExampleFileName.pdf:)(:issuedate:2017-09-04:)(:description:an example for the pagelist output:)
(:template first:)
(:template first {=$Group}:)
(:cellnr:) Topic
(:cell:) standard
(:cell:) issue date
(:cell:) description
(:template each:)
(:template last:)
(:pagelist fmt=#standardlist group=PmWiki name=PageList* count=4:)

(:template first:)

(:template first {=$Group}:)

Topic standard issue date description

(:template each:)

{=$FullName}? Attach:{{=$FullName}$:file} {{=$FullName}$:issuedate} {{=$FullName}$:description}

(:template last:)

Topic standard issue date description
PmWiki.PageLists Attach:
PmWiki.PageLists-Talk Attach:
PmWiki.PageListTemplates Attach:
PmWiki.PageListTemplates-Talk Attach:ExampleFileName.pdf 2017-09-04 an example for the pagelist output

Andreas 29.01.2010

How does this look?

In a pagelist template I want to be able to supplement a parameter, e.g.

(:template defaults name=-SideBar,-RecentUploads,-RecentChanges,{$$name}:)

However I still see the excluded names returned? Is this possible? simon September 04, 2017, at 03:11 AM

No, but you can have (:template defaults list=normal:) to exclude most but not SideBar, or add your own "list=mylist" patterns, eg
$SearchPatterns['mylist'] = array('servicepages'=> '!\\.(SideBar|RecentUploads|RecentChanges)$!');
See $SearchPatterns. --Petko September 04, 2017, at 04:40 AM

This is a talk page for improving PmWiki.PageListTemplates.