PHP Classes

site sections

Recommend this page to a friend!

      Site Search  >  All threads  >  site sections  >  (Un) Subscribe thread alerts  
Subject:site sections
Summary:Use of sections
Author:Willis Olivo
Date:2007-07-10 14:32:09

  1. site sections   Reply   Report abuse  
Willis Olivo - 2007-07-10 14:32:09
Our website is available in several languages and I would like to set it up so that only the relative pages are searched. The current directory structure is as follows:

../ - root
/search - contains class
/_spanish - all pages in spanish
/_spanish/search - duplicate copy of class file

Below is the beginig portion of the script:

// Imports SiteSearch class
require_once "../search/class.php"; //modified by willis

$Search = new SiteSearch();

// This will create search sections (you MUST create at least one).
// All subdirectories will be searched in automatically
$Search->addSection("PRASAD", "../_spanish");

Can you please let me know if this is correct?

Thank you