Add [[!template id=gitbranch]] for things available from git, and use it
[ikiwiki.git] / doc / todo / pagestats_among_a_subset_of_pages.mdwn
1 [[!tag patch plugins/pagestats]]
2 [[!template id=gitbranch branch=smcv/among author="[[smcv]]"]]
3
4 My `among` branch fixes [[todo/backlinks_result_is_lossy]], then uses that
5 to provide pagestats for links from a subset of pages. From the docs included
6 in the patch:
7
8 > The optional `among` parameter limits counting to pages that match a
9 > [[ikiwiki/PageSpec]]. For instance, to display a cloud of tags used on blog
10 > entries, you could use:
11 >
12 >     \[[!pagestats pages="tags/*" among="blog/posts/*"]]
13 >
14 > or to display a cloud of tags related to Linux, you could use:
15
16 >     \[[!pagestats pages="tags/* and not tags/linux" among="tagged(linux)"]]
17
18 I use this on my tag pages on one site, with the following template:
19
20     \[[!pagestats pages="tags/* and !tags/<TMPL_VAR raw_tag>
21         and !tags/photogallery"
22       among="tagged(<TMPL_VAR raw_tag>)"]]
23
24     \[[!inline pages="tagged(<TMPL_VAR raw_tag>)"
25       archive="yes" quick="yes" reverse="yes" timeformat="%x"]]
26
27 --[[smcv]]