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