Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
Related Article Lists

 

 


del
User

Dec 4, 2006, 4:37 PM

Post #1 of 1 (470 views)
Shortcut
Related Article Lists Can't Post

I implemented the code in the tutorial for related article lists. The code suggested for executing the search was:

<!--#include virtual="/cgi-bin/artman2/search.cgi?action=search&keywordSearchFields=keyword&keyword=Democracy&template=searchEngine/relatedArticles.html&perpage=10" -->

Unfortunately this does not work on php generated pages. I used the following code which does works on php pages.

<?php echo @stripslashes( @join( @file( "http://www.yourdomain.com/cgi-bin/artman2/search.cgi?action=search&keywordSearchFields=keyword&keyword=$article.keyword$&template=searchEngine/relatedArticles.html&perpage=10" ),"" ) ) ?>

I did not like the fact that the search is performed on the 'keyword' field which would mean updating all articles with keywords so I changed the parameter from 'keywordSearchFields=keyword' to 'keywordSearchFields=title'. This provides a list of related articles without having to modify existing articles.

Looking at the search script and the 'searchForm.html' template I found you could also supply multiple fields to search on. For example you could have 'keywordSearchFields=title,summary'

Is there a way to specify more than one keyword to search on?