[pmwiki-users] Any way to get page counts with breaks based on a PTV?

Dominique Faure dominique.faure at gmail.com
Tue Nov 12 02:11:52 PST 2019


Hi,

You may have a try with the variables handling provided by the
MarkupExprPlus recipe.

Regards

On Mon, Nov 11, 2019 at 9:15 PM Christopher Cox <ccox at endlessnow.com> wrote:

> Consider the following template and assume a SysUser group with pages of
> users having the PTVs: department, name and active.
>
> [[#test1]]
> (:template defaults order=$:department:)
> (:template first {=$:department}:)
>
> Users in {=$:department}
> (:template each:)
> (:if equal {=$:active} true:)
> * [[{=$FullName}|{=$:name}]]
> (:ifend:)
> (:template last {=$:department}:)
> {=$:department} contains ???? pages.
> [[#test1end]]
>
>
> My question is if there's any way to get establish a counter that is
> zeroed for each new department and can be referenced in the "last" where
> I have the ????.
>
> I know there are counters for pages and groups.  Here, it's the same
> group, and I want a counter that I can set somehow based on the PTV
> change.  Possible?
>
> Ultimately, I'm hoping to use such things to generate pie charts (in
> case you wondering).
>
> Department  Count
> ----------  -----
> IT          3
> Accounting  5
> etc..
>
> Yes, I know I can do this with lots of individual pagelists, just trying
> to see if there was a more efficient way.
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20191112/159e18ea/attachment.html>


More information about the pmwiki-users mailing list