
Dave
Staff
/ Moderator

Aug 19, 2002, 2:52 PM
Post #1 of 27
(15787 views)
Shortcut
|
|
Creating a full article list for feeding search engines
|
Can't Post
|
|
Hello, I've put together a quick example of how you can use a SSI and the search engine to generate a full list of all your articles for feeding to the search engines. Here's how to do it. First, we create a new template called "search_results_minimal.html" and save it in /templates/search/. We'll tell the search engine to use this template for it's output and it will control how our full article list looks. Next, we'll create a file called "all_articles.shtml" in the /publish/ folder that has nothing in it but a single SSI tag. The SSI tag needs to start with the full virtual path (everything after http://yourdomain.com) to your search engine and should look something like this: <!--#include virtual="/cgi/artman/exec/search.cgi?search=1&perpage=999999&template=search/search_results_minimal.html" --> The forum may wrap that, but make sure it's all on one line. It basically says: show the search results, show 999,999 results per page, and use the search_results_minimal.html template for output. Now, when the search engines index "all_articles.shtml" they'll treat it as a regular static html file, but it will dynamically include all the latest article titles and links with search.cgi, making sure the search engines have a direct path to all your published articles so they can index them. One last note, if you're on windows "include virtual" doesn't work properly so you'll need to replace that with "exec cgi". Interestingly enough, "exec cgi" doesn't work on unix (when using a query string). Weird, eh? I've attached a sample file for "search_results_minimal.html" and "all_articles.shtml". We sure to edit "all_articles.shtml" first because it has the SSI's for windows and unix in it. Dave Edis - Senior Developer interactivetools.com
|