X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/0e173f38aea0b72dce9dd4994335569f5cfecce4..6233717ded4b4c3561aa68dfb5d740b7b337c3aa:/doc/forum/Doing_related_links_based_on_tags.mdwn?ds=sidebyside diff --git a/doc/forum/Doing_related_links_based_on_tags.mdwn b/doc/forum/Doing_related_links_based_on_tags.mdwn index 6b1460941..9f6a1b937 100644 --- a/doc/forum/Doing_related_links_based_on_tags.mdwn +++ b/doc/forum/Doing_related_links_based_on_tags.mdwn @@ -1,26 +1,31 @@ I've been recently using a template this -
----- -Related posts: + ---- + Related posts: -[[\!inline pages="blog/posts/* - and !blog/posts/*/* - and !Discussion - and !tagged(draft) - and+ \[[!inline pages="blog/posts/* + and !blog/posts/*/* + and !Discussion + and !tagged(draft) + and" - archive="yes" - quick="yes" - show="5"]] -
-[[\!tag software linux]] -[[\!template id=related tagged="tagged(software) or tagged(linux)"]] -+ \[[!tag software linux]] + \[[!template id=related tagged="tagged(software) or tagged(linux)"]] -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? +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. +I know that the [[backlinks]] plugin exists for this sort of stuff +(related links), it just lacks some user configuration options. + +> I guess what you need is an extension to [[ikiwiki/pagespec/sorting]] to support "random" as a sort method. Remember though, that the chosen few would only change when the page was regenerated, not on every page view. -- [[Jon]]