Re: Pagelist : count inner sections (not total) ?
ABClf <[email protected]>
| Newsgroups | gmane.comp.web.wiki.pmwiki.user |
|---|---|
| Message-ID | <CACE3LEs_25k448iVXKLnCMBErtEHHy9kDgmZtbqJgsTcQ98FWw@mail.gmail.com> |
Tested and adopted, I'm very happy with the result ; this works perfectly, it's a very nice little thing added since 2.2.122 ; thank you. In my case, most of my hobby is collecting words from books and, if possible, give them a sort of birthdate (infinite task) ; with pagelist 1, I can list words coming from book X or Y and, not only order them, yet also group them by year ; in pagelist 2, I can print out the count for every year. Congratulations to those who make all of this possible ! Le dim. 30 avr. 2023 à 18:48, Petko Yotov <[email protected]> a écrit : > > 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