Hello, I am trying to setup a search box in the header of my website, and I’m confused as to where to place the search results tag. I am using the simple code in the header:
{exp:search:simple_form channel="news"}
<label for="keywords">Search </label><input type="text" name="keywords" id="keywords" value="" size="18" maxlength="100" /><input type="submit" value="submit" class="submit" > {/exp:search:simple_form}
i am using search-results code:
<table border="0" cellpadding="6" cellspacing="1" width="100%">
<tr>
<th>{lang:title}</th>
<th>{lang:excerpt}</th>
<th>{lang:author}</th>
<th>{lang:date}</th>
<th>{lang:total_comments}</th>
<th>{lang:recent_comments}</th>
</tr>
{exp:search:search_results switch="resultRowOne|resultRowTwo"}
<tr class="{switch}">
<td width="30%" valign="top"><b><a href="http://{auto_path}">{title}</a></b></td>
<td width="30%" valign="top">{excerpt}</td>
<td width="10%" valign="top"><a href="http://{member_path=member/index}">{author}</a></td>
<td width="10%" valign="top">{entry_date format="%m/%d/%y"}</td>
<td width="10%" valign="top">{comment_total}</td>
<td width="10%" valign="top">{recent_comment_date format="%m/%d/%y"}</td>
</tr>
{/exp:search:search_results}
</table>
{if paginate}
<div class='paginate'>
<span class='pagecount'>{page_count}</span> {paginate}
</div>
{/if}
What is the proper method to display the search results? Where dodi need to place the search-results tag?
Moved to CodeShare Corner by Moderator