PageListTemplates-Talk
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
Questions
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
[[#tpl]] (:template first:) [[{$Group} | {$Groupspaced}]] <<< I do mean {$Group} but I want this group's default page's spaced title (:template ! first:) [[{=$Name} | {=$Titlespaced}]] [[#tplend]] |
--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?
Cookbook:MarkupExprPlus provides the expressions set
and setq
that may do the job. --Petko May 01, 2020, at 05:46 PM
Can template last
be used when template each
includes another pagelist?
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?
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:) >>comment<< [[#standardlist]] (:template first:) (:table:) (:template first {=$Group}:) (:cellnr:) Topic (:cell:) standard (:cell:) issue date (:cell:) description (:template each:) (:cellnr:)[[{=$FullName}]] (:cell:)Attach:{{=$FullName}$:file} (:cell:){{=$FullName}$:issuedate} (:cell:){{=$FullName}$:description} (:template last:) (:tableend:) [[#standardlistend]] >><< (:pagelist fmt=#standardlist group=PmWiki name=PageList* count=4:) | ||||||||||||||||||||
|
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.