Search Function

The search function is used to display a text box with a search button on the template. When seen on the template on the Web page, a user can enter text and click the search button to search through all the content on the Web site.

Ektron has created two search functions:

ecmSearch

ecmSearchNoFormTag

Both functions have the same parameters and perform the same search. The only difference is ecmSearch automatically inserts form tags, ecmSearchNoFormTag does not.

The following is an example of form tags.

<form name="ecmsearch" method="post" action='search-display.asp'>

</form>

When using ecmSearch, form tags are added automatically. When using ecmSearchNoFormTag you need to add the tags manually

Here is the format for the search function. You can interchange ecmSearch and ecmSearchNoFormTag when using this function.

<?php ecmSearch( “StartingFolder”,

Recursive,

"targetpage",

textbox,

MaxCharacters,

"ButtonImgSrc",

"ButtonText",

"FontFace",

"FontColor",

"FontSize",

Horizontal,

"Spare" );

?>

This function is basically the same as the Search function in ASP. See Search Functions (ASP) for details.

The only difference between the PHP function and the ASP one is the syntax for implementing it. The PHP example is below.

Search Function Example

<TR>

 <TD>

  <?php ecmSearch("\\Marketing",1,"search-  display.php",25,200,"","Search","Verdana","#808080","2",0,""); ?>

 </TD>

</TR>

Previous TopicNext Topic|