LunpaCMS Whipping your website into shape! Introducing Lunpa, our mascot.  Her mother was a hamster and her father was Chilean M00se.  Oddly, neither smelt of elderberries.


Searching in LunpaCMS

Overview

LunpaCMS comes with built-in search functionality that currently works with templates, news articles, and employees.

Setting Up Search

Below are the steps to adding search to a LunpaCMS site:

  1. Make sure your site has search.cgim in its home directory (new sites will have this automatically copied, older sites need to copy it from codebase)
  2. Look through search.cgim and make sure all of the code that is needed is runnning(i.e. if you want employees to be searchable, make sure the section marked "Uncomment to implement employee search" is uncommented)
  3. Add a simple form that will submit the variables to search.cgim, such as the example below:
    <form action="/search.cgim" method="post">
      <font face=:::map_title_face::: size=2><label for="site_search">Keyword:<label>
      <input class="searchBox" id="site_search" name="site_search" value="" type="text"> 
      <input value="Search" type="submit"></font>
    </form>
    

Searching Templates

Only templates marked with the Sitemap option will display in the search results. Templates are automatically indexed (or de-indexed if the sitemap option has been unselected) whenever they are added or edited, so the newest version is always what will be searchable.

Searching News Articles

News categories can be marked as searchable or not searchable by going into News Manager and clicking on "Manage Categories" and then selecting those that you want to be searchable. All news articles that include that category will show up in the search results. In order to manage non-categorized templates, set the map :::LOCAL_NEWSMANAGER_SEARCH_UNCATEGORIZED_ARTICLES::: to 1 to make non-categorized articles searchable and 0 to make them not searchable. In order for this change to take effect, the articles will then have to be indexed or de-indexed.

Searching Employees

Employees will be searchable if they are not disabled. To search only employees, make sure there is an option in the get_search_form function for employees.


Add Your Comment


(Only a limited set of HTML tags such as <b>, <i>, <u> are allowed. Embedded flash video from Youtube or Vimeo are also supported.)


Copyright © 2024 Peregrine Computer Consultants Corp. All rights reserved.

About Lunpa, our mascot. Her mother was a hamster and her father was an ill-tempered Chilean M00se. Oddly, neither smelt of elderberries.
The artist is Jennifer Lomax.