Deprecated: Assigning the return value of new by reference is deprecated in /usr/home/simplel/public_html/wiki/pmwiki/cookbook/sourceblock.php on line 129
SimpleLog wiki | Themes / SearchHeading
Recent Changes - Search:

SimpleLog wiki

Installing SimpleLog

        MT(gs) users
        DreamHost users

Upgrading

Working with themes

How to

Troubleshooting

Development & resources

SearchHeading

Add Proper Headings to Your Search Results

Using a technique similar to those outlined in the ArchiveHeadings snippet, we can determine what the user was searching for and show it in the Search header.

In this case, we need to pull the parameter of the search form, params[:q].

Your final result should resemble:

<h1>Found <%= pluralize(@posts.length, 'posts') %> for <%= params[:q] %></h1>

Edit - History - Print - Recent Changes - Search
Page last modified on January 08, 2008, at 12:37 PM EST