aboutsummaryrefslogtreecommitdiff
path: root/doc/forum/Doing_related_links_based_on_tags.mdwn
diff options
context:
space:
mode:
authorhttps://www.google.com/accounts/o8/id?id=AItOawkd3OQ-XyZ7mYJyCT3mMLBt05DuuZ_1Gvo <Jimmy@web>2011-04-10 05:18:05 -0400
committerJoey Hess <joey@kitenet.net>2011-04-10 05:18:05 -0400
commit0e173f38aea0b72dce9dd4994335569f5cfecce4 (patch)
tree936ca017d39df77ceb2806c8c903127f13465ba6 /doc/forum/Doing_related_links_based_on_tags.mdwn
parent9b5445a323e2efa17b04320f5f89a11535b1cd6b (diff)
downloadikiwiki-0e173f38aea0b72dce9dd4994335569f5cfecce4.tar
ikiwiki-0e173f38aea0b72dce9dd4994335569f5cfecce4.tar.gz
Diffstat (limited to 'doc/forum/Doing_related_links_based_on_tags.mdwn')
-rw-r--r--doc/forum/Doing_related_links_based_on_tags.mdwn26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/forum/Doing_related_links_based_on_tags.mdwn b/doc/forum/Doing_related_links_based_on_tags.mdwn
new file mode 100644
index 000000000..6b1460941
--- /dev/null
+++ b/doc/forum/Doing_related_links_based_on_tags.mdwn
@@ -0,0 +1,26 @@
+I've been recently using a template this
+
+<pre>
+----
+Related posts:
+
+[[\!inline pages="blog/posts/*
+ and !blog/posts/*/*
+ and !Discussion
+ and !tagged(draft)
+ and <TMPL_VAR raw_tagged>"
+ archive="yes"
+ quick="yes"
+ show="5"]]
+</pre>
+
+Which I then call by doing this at the end of my blog posts on my ikiwiki install
+
+<pre>
+[[\!tag software linux]]
+[[\!template id=related tagged="tagged(software) or tagged(linux)"]]
+</pre>
+
+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?
+
+I know that the [[backlinks]] plugin exists for this sort of stuff (related links), it just lacks some user configuration options.