Hello,
I am going to resurrect this old post to share my "related pages" approach. It uses the described pages-as-tags and then looks for pages with the same tags. The more tags are shared, the more "related" the other page is, thus getting it further up on the list.
foreach($page->tags as $tags) {
$tag = $sanitizer->selectorValue($tags->title);
$related_pages = $pages->find("tags.title=$tag");
foreach($related_pages as $related) {
if($related->id != $page->id) $related_id[$related->id]++;
}
}
arsort($related_id);
foreach($related_id as $key => $val){
$rp = $pages->get($key); ?>
<a href="<?=$rp->url;?>"><?=$rp->title;?><br><?
}
I just translated this to PW from a Perl module I had, so please feel free to correct my PW syntax since I'm new to this.
Thanks,
thomas