Re: Pagelist : count inner sections (not total) ?

Petko Yotov <[email protected]>
Newsgroups gmane.comp.web.wiki.pmwiki.user
Message-ID <[email protected]>
Oh, you couldn't have found the example earlier since I added it just 
now. :-)

Petko

On 30/04/2023 18:43, ABClf wrote:
> I'm gonna try soon ;
> thank you for the example link I haven't found by myself.
> Gilles.
> 
> Le dim. 30 avr. 2023 à 18:05, Petko Yotov <[email protected]> a écrit :
>> 
>> You can probably do something like this:
>> 
>> [[#lasteachcount]]
>> (:template last "{=$:attestation}":)
>> {=$:attestation} ({$$EachCount})
>> [[#lasteachcountend]]
>> 
>> (:pagelist ... fmt=#lasteachcount:)
>> 
>> See an example similar to what you describe near the top of this page:
>> 
>>    https://www.pmwiki.org/wiki/Test/EachCount
>> 
>> Petko
>> 
>> 
>> 
>> On 30/04/2023 17:44, ABClf wrote:
>> > Hello,
>> >
>> > I have set up a pagelist for listing ptv {=$:attestation} (it's a
>> > year), then format the output to be grouped by ptv {=$:attestation} :
>> >
>> > [[#triparan]]
>> > (:template first {=$:attestation}:)
>> >
>> > !!!!{=$:attestation}
>> > (:template each:)
>> > # [[{=$FullName}|+]] @@{=$:attestation}@@ – ''{=$:sens}''
>> > [[#triparanend]]
>> >
>> > pagelist is :
>> > (:pagelist group=Bob link={(substr {*$FullName} 0 -6)} fmt=#triparan
>> > order=$NbSource $:attestation=- order={=$:attestation}:)
>> >
>> > This works ;
>> > i get something like
>> >
>> > 1900
>> > 1. blabla
>> > 2. bloblo
>> >
>> > 1903
>> > 1. blibli
>> > 2. blublu
>> > 3. blybly
>> >
>> > My question is : does something exist which would make possible to
>> > count how many items are collected for every section (in order, not to
>> > show the content, but to count it) ; which, formatted, would give me
>> > something like :
>> >
>> > 1900 (2) 1903 (3)
>> >
>> > I don't know whether {$$EachCount} can do the job and, if yes, how to
>> > use it ?
>> > (https://www.pmwiki.org/wiki/PmWiki/PageListTemplates)
>> >
>> > Thank you,
>> > Gilles.
>> >

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.