]> sipb.mit.edu Git - ikiwiki.git/blob - doc/forum/Doing_related_links_based_on_tags.mdwn
(no commit message)
[ikiwiki.git] / doc / forum / Doing_related_links_based_on_tags.mdwn
1 I've been recently using a template this
2
3 <pre>
4 ----
5 Related posts:
6
7 [[\!inline pages="blog/posts/*
8         and !blog/posts/*/*
9         and !Discussion
10         and !tagged(draft)
11         and <TMPL_VAR raw_tagged>"
12         archive="yes"
13         quick="yes"
14         show="5"]]
15 </pre>
16
17 Which I then call by doing this at the end of my blog posts on my ikiwiki install
18
19 <pre>
20 [[\!tag software linux]]
21 [[\!template id=related tagged="tagged(software) or tagged(linux)"]]
22 </pre>
23
24 It somewhat works, I was wondering if anyone else has tried to do something like the above to get "related posts" based on tags. The way that I have done it isn't very clever as it only links to the last 5 most recently posted items based on my parameters. Is it possible to "randomly" select a bunch of links from a set of user defined pagespecs?
25
26 I know that the [[backlinks]] plugin exists for this sort of stuff (related links), it just lacks some user configuration options.