ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Mssing code for search...

March 21, 2011 2:47pm

Subscribe [2]
  • #1 / Mar 21, 2011 2:47pm

    tebben

    3 posts

    Hi!

    Have this template code for search box
    But the template for the site is gone ?

    The template was blank, before my upgrade to 2.1.3
    So i think there must be some hackers, that have removed this data..

    What can be missing here ?

    <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”>{title}</td>
    <td width=“30%” valign=“top”>{excerpt}</td>
    <td width=“10%” valign=“top”>{author}</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’>

    {page_count}  {paginate}

    </div>

    {/if}

    Please help

  • #2 / Mar 22, 2011 10:20am

    Sue Crocker

    26054 posts

    tebben, search requires you to have two different templates. One for the simple/advanced search, and one for the results template.

    You’re posting the results template here…

    Which you can find in the docs here:

    http://ellislab.com/expressionengine/user-guide/modules/search/results.html

    The actual search code can be found here: http://ellislab.com/expressionengine/user-guide/modules/search/index.html#simple

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases